FosterMolasses@leminal.space to 196@lemmy.blahaj.zoneEnglish · edit-21 个月前Improvise adapt overruleleminal.spaceimagemessage-square34fedilinkarrow-up1703
arrow-up1703imageImprovise adapt overruleleminal.spaceFosterMolasses@leminal.space to 196@lemmy.blahaj.zoneEnglish · edit-21 个月前message-square34fedilink
minus-squareSasquatch@lemmy.mllinkfedilinkEnglisharrow-up2·1 个月前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?
minus-squaretomalley8342@lemmy.worldlinkfedilinkEnglisharrow-up2·1 个月前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
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