[parsec-users] Dedup Memory Allocation

grishma kotecha grish619 at gmail.com
Tue Aug 4 17:09:41 EDT 2009


Following is the definition of MAXBUF (defined in file “dedupdef.h” )

#define MAXBUF (600*1024*1024)     /* 128 MB for buffers */

In bracket it is written 128 MB but figure comes out to be 600MB. Is this a
bug or it means something else?

Because of this the malloc function in encoder.c fails. See the following

Enoder.c, Line 652

  u_char * src = (u_char *)malloc(MAXBUF*2);  à Succeeds

  u_char * left = (u_char *)malloc(MAXBUF);   à Memory allocation fails here

  u_char * new = (u_char *) malloc(MAXBUF); à Fails here . Not enough memory
to assign.

In 32 bit systems application gets max 2 GB memory. The above three
statements exceeds 2 GB limit.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/parsec-users/attachments/20090804/d1d5e15b/attachment.html>

More information about the parsec-users mailing list