C
cs
in chapter 8.7 of K&R2(an example of memory allocator)
if i write NALLOC==1024 (is it 1K?) in my pc (that has 40MegaBytes of
memory) and i ask memory for many arrays of more than 1K there is the
problem that Pc reads the disk (seems doesn't have memory).
instead if i write
NALLOC==1024*1024*2 (is it 2.048 MegaBytes?)
all seems right.
Where is the error?
I have an error in that malloc function?
I have an error in the function that give memory to malloc function?
I have an error in the function that call malloc function?
NALLOC is not right. What value is right for NALLOC macro value?
Thank you if you can read in the crystal ball
if i write NALLOC==1024 (is it 1K?) in my pc (that has 40MegaBytes of
memory) and i ask memory for many arrays of more than 1K there is the
problem that Pc reads the disk (seems doesn't have memory).
instead if i write
NALLOC==1024*1024*2 (is it 2.048 MegaBytes?)
all seems right.
Where is the error?
I have an error in that malloc function?
I have an error in the function that give memory to malloc function?
I have an error in the function that call malloc function?
NALLOC is not right. What value is right for NALLOC macro value?
Thank you if you can read in the crystal ball