Skip to main content
3 events
when toggle format what by license comment
Dec 17, 2021 at 6:41 comment added Bart van Ingen Schenau @Mecki, such a user needs to make an estimate for the allocation pattern they will use and how much overhead that allocation pattern incurs. Based on that they can set a proper bound on the memory available to your allocator.
Dec 17, 2021 at 0:11 comment added Mecki How would you then deal with the problem that a user requires a pool for holding up to 384 kiB of data? What bound should that user set? When setting 384 kiB, it's for sure that this is too little. Of course, you can always just add some "safety margin" but it's hard to tell how big it must be. E.g. on Linux the receive socket buffer size of an UDP socket includes overhead, so when you set it to 512 kiB, the kernel will in fact set it to 1 MiB (doubling whatever you have requested) to compensate for any possible overhead but that seems very wasteful to me.
Dec 16, 2021 at 19:29 history answered candied_orange CC BY-SA 4.0