[NSWI004] A02 - malloc request limit

Petr Tuma petr.tuma at d3s.mff.cuni.cz
Mon Nov 2 07:37:24 CET 2020


Hello,

just curious, why would such a limit be useful ? The only thing I can think of is trying very hard to keep the headers very small (saving bits on size fields), but even for that a limit of around 4KB seems to be quite small - and besides, by now I think you have all seen how hard it is to avoid the alignment restrictions, which means aiming for a header smaller than 4B in your assignments does not make much sense (and possibly 8B would me more reasonable than 4B).

Petr


On 01/11/2020 23:08, František Trebuňa wrote:
> In the tests malloc asks for maximum o f 32 KB if Im not mistaken.
> 
> Trebuňa
> 
> On Sun, Nov 1, 2020, 22:33 R S <rstrnadlova at gmail.com <mailto:rstrnadlova at gmail.com>> wrote:
> 
>     Hello,
>     can we limit how much memory can malloc ask for (for instance to 4056B) or can malloc theoretically ask for half our heap?
> 
>     Thank you
>     Strnadlová from Milkyway
>     _______________________________________________
>     NSWI004 mailing list
>     NSWI004 at d3s.mff.cuni.cz <mailto:NSWI004 at d3s.mff.cuni.cz>
>     https://d3s.mff.cuni.cz/mailman/listinfo/nswi004 <https://d3s.mff.cuni.cz/mailman/listinfo/nswi004>
> 
> 
> _______________________________________________
> NSWI004 mailing list
> NSWI004 at d3s.mff.cuni.cz
> https://d3s.mff.cuni.cz/mailman/listinfo/nswi004
> 


More information about the NSWI004 mailing list