Can some throw bright light on Linux Memory Allocation
MirJafar Aki
mirjafar2008 at gmail.com
Thu Aug 7 13:39:34 UTC 2008
Hello,
I have installed Ubuntu on a machine with following
config.
RAM : 2 GB
Machine: Intel Core 2 Duo
OS: Ubuntu 64 bit.
Disk: 250 GB.
I have attached a simple program to test memory allocation on linux and
something strange is happening.
1. If I invoke large_memory function then maximum
size I am allowed is 245GB.
2. If I use less than 245GB ( say 244 GB) then the
second stage is also passed. Where from OS is
allocating 244GB ?
3. Strange enough, if I use chuck memory, I can
goto 3817GB before I get segmentation fault.
( and buf == NULL is never reached ).
4. Much more strange, GoogleHeapProfiler, and
ValGrindHeap profile also add to my uneasiness
and report that 3817GB allocation is successful.
What is happening ? Please help.
Mir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080807/e368f334/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cc
Type: text/x-c++src
Size: 920 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080807/e368f334/attachment.cc>
More information about the ubuntu-users
mailing list