how much memory allocation can we allocate using malloc. what is the maximum value in bytes..
how much memory allocation can we allocate using malloc. what is the maximum value in bytes..
As much free virtual memory in a contiguous space that is available.
In other words, it's operating system dependant and it's also dependant on how much virtual memory you've already used and how fragmented the virtual memory is.
No hard limit.
But don't go abusing it because of that.
Depends on the OS-model, which in turn depends on the processor architecture as well as implementation details in the OS itself [e.g. an OS may well decide to use an arbitrary limit that is lower than what the processor can technically cope with].
Usual numbers are:
16-bit DOS - 64KB.
32-bit Linux - 1 or 3 GB.
32-bit Windows 2GB.
64-bit Windows 16TB.
64-bit Linux 16TB.
Those are the limits for the virtual address space, of course, if there isn't enough RAM and Swap-space, the limitation of RAM/Swap-space will stop you before the physical memory limit does.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
thank u guys.. thanks a lot