Quantcast
Viewing latest article 8
Browse Latest Browse All 11

Answer by Chris Cooper for maximum memory which malloc can allocate

I don't actually know why that failed, but one thing to note is that `malloc(4)" may not actually give you 4 bytes, so this technique is not really an accurate way to find your maximum heap size.

I found this out from my question here.

For instance, when you declare 4 bytes of memory, the space directly before your memory could contain the integer 4, as an indication to the kernel of how much memory you asked for.


Viewing latest article 8
Browse Latest Browse All 11

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>