Here's a patch for libc/malloc.c. Don't even ask me how I found it. If
you have been using malloc() to get lots of > 4K chunks of memory, this bug
might cause you to suffer subtle memory corruption problems.
Andy
*** c:/tmp/T0AA.AAA Sun Feb 06 19:53:34 1994
--- malloc.c Sun Feb 06 19:47:38 1994
***************
*** 312,324 ****
char *p;
uint x, pgs;
/*
* Fill in per-page information
*/
! pgs = btorp(size);
p = alloc_pages(pgs);
set_size(p, b-buckets);
/*
* Parcel as many chunks as will fit out of the memory
*/
--- 312,324 ----
char *p;
uint x, pgs;
/*
* Fill in per-page information
*/
! pgs = btorp(b->b_size);
p = alloc_pages(pgs);
set_size(p, b-buckets);
/*
* Parcel as many chunks as will fit out of the memory
*/
Received on Sun Feb 6 19:30:45 1994
This archive was generated by hypermail 2.1.8 : Wed Sep 21 2005 - 21:02:10 PDT