This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
Malloc's Behavior
- To: Glib-Linux <glibc-linux at ricardo dot ecn dot wfu dot edu>
- Subject: Malloc's Behavior
- From: "D. Sharma" <DhirajSharma at compuserve dot com>
- Date: Sat, 26 Aug 2000 00:13:43 -0400
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
I have a short program on Pentium, Red-Hat Linux that does the following:
malloc(100);
malloc(300000)
malloc(100);
In addition the pointers returned by malloc are printed. I find that
the first and the third calls give me pointers at about 130 MB, which seems
ok. The second gives me a pointer at 1.03 GB position, which seems
too high. After a few more allocations, the program get a setmentation
fault in a subsequent call to malloc(). There is no call to free() or
realloc(). Any insight will be appreciated.
Dhiraj Sharma
dhirajsharma@compuserve.com