FosterMolasses@leminal.space to 196@lemmy.blahaj.zoneEnglish · edit-23 days agoImprovise adapt overruleleminal.spaceimagemessage-square33linkfedilinkarrow-up1679arrow-down10
arrow-up1679arrow-down1imageImprovise adapt overruleleminal.spaceFosterMolasses@leminal.space to 196@lemmy.blahaj.zoneEnglish · edit-23 days agomessage-square33linkfedilink
minus-squareSasquatch@lemmy.mllinkfedilinkEnglisharrow-up2·2 days agoim not sure how malloc() works, but I would guess it would attempt to squeeze new allocations into partially-filled memory pages, right? Wouldn’t that largely offset the inefficiency?
minus-squaretomalley8342@lemmy.worldlinkfedilinkEnglisharrow-up2·2 days agoTransfers to cache get brought in much smaller sizes than a memory page so I can’t imagine an automated treatment like that from the heap end would be effective. However there are ways to lay out linked lists in memory so that it is more friendly to cache
im not sure how
malloc()works, but I would guess it would attempt to squeeze new allocations into partially-filled memory pages, right? Wouldn’t that largely offset the inefficiency?Transfers to cache get brought in much smaller sizes than a memory page so I can’t imagine an automated treatment like that from the heap end would be effective. However there are ways to lay out linked lists in memory so that it is more friendly to cache