> > If the MemPage are malloced individually (instead of being put in arrays), 
> > then they are 16
> byte
> > aligned on most platforms, making the allocated block effectively the same 
> > size (well, that
> > depends on how many bytes are used by malloc before the user block in 
> > memory).
> 
> This patch does indeed save memory - on Linux at least.
> Linux has a malloc mimimum resolution of 8 bytes, not 16.

I mis-wrote: Linux's minimum malloc, malloc(1), will occupy 16 bytes
of heap as you stated. 

Malloc(n) on Linux will allocate the next multiple of 8 bytes
for (n+4), minimum 16 bytes total.

Observed malloc behavior on Linux -
Malloc'd bytes on the left, heap occupied by that malloc on right:

1       16
2       16
3       16
4       16
5       16
6       16
7       16
8       16
9       16
10      16
11      16
12      16
13      24
14      24
15      24
16      24
17      24
18      24
19      24
20      24
21      32
22      32
23      32
24      32
25      32
26      32
27      32
28      32
29      40
30      40
31      40
32      40
33      40
34      40
35      40
36      40
37      48
38      48
39      48
40      48
41      48
42      48
43      48
44      48
45      56
46      56
47      56
48      56
49      56
50      56
51      56
52      56
53      64
54      64
55      64
56      64
57      64
58      64
59      64
60      64
61      72
62      72
63      72
64      72
65      72

etc...


 
____________________________________________________________________________________
Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to