If I try to do an allocation of 512MB using sbrk(), it fails. However, I
can successfully do 512 sbrk()'s of 1MB. This causes a problem if I store
the pointers to the 1MB blocks, and then try and write to the 512MB of
memory I have just allocated ... the kernel seems to lock up solid. If I
write to each 1MB as it is allocated, the allocation fails around 180MB
(amount of free memory).
If I understand correctly I can allocate more memory than I have because
the physical memory pages are not allocated until you access a block
(allowing sparse data structures).
So, my first question is why does the single sbrk(512MB) fail whilst the
512 x sbrk(1MB) succeeds ?
Secondly, does the kernel lock up, or did I just not wait long enough for
it to come back ? ... I'm not keen to try it again, as it resulted in an
hour of fsck'ing ... 8-)
Thanks...
P.
2.1.104p1 x86 UP (compiled SMP)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu