4 ms·
That's true. You still have the heap overhead, though. If the heap allocates an int (for the block size) just before the block it returns, then if your linked
by AnimalMuppet 10y ago
That's true. You still have the heap overhead, though. If the heap allocates an int (for the block size) just before the block it returns, then if your linked list contains ints, the heap memory overhead is 50%. This means you get half as many entries in a cache line, even if they were allocated in order.