Jump to content

Talk:Region-based memory management

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by 2001:4bb8:2dc:779a:b92f:464a:86ba:6a4b (talk) at 16:43, 1 June 2025. The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
[edit]

Hello fellow Wikipedians,

I have just added archive links to one external link on Region-based memory management. Please take a moment to review my edit. If necessary, add {{cbignore}} after the link to keep me from modifying it. Alternatively, you can add {{nobots|deny=InternetArchiveBot}} to keep me off the page altogether. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true to let others know.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—cyberbot IITalk to my owner:Online 07:23, 25 February 2016 (UTC)[reply]

About the example

[edit]

Wouldn't it be better to change

ListNode* newNode = allocateFromRegion(r, sizeof(ListNode));

into

ListNode* newNode = allocateFromRegion(r, sizeof(*newNode));

Of course, the code does the same thing. But if you change the referent type of

newNode

it would be less error prone (you only have to change the type in one place). — Preceding unsigned comment added by Mlehn (talkcontribs) 09:14, 21 February 2021 (UTC)[reply]

[edit]

Is this concept related to arenas? What are the differences? Codegrinder (talk) 08:42, 6 March 2024 (UTC)[reply]

Advantages need to be mentioned prominently

[edit]

Arenas(/Regions) are great for spatial cache locality, also oftentimes you can use smaller relative pointers (i.e. 32-bit indices into the arena instead of a 64-bit pointer) to reference objects inside the arena. Both of these properties can be tremendous performance enhancements. Arenas are among the most important tools of Data-oriented design. Yet this article fails to properly mention these advantages while only naming disadvantages. Also, freeing all memory at once can actually, in some scenarios, be an advantage as well, as we don't have to pay the cost of running the allocator free code on each of the objects individually, and if the objects need to be kept around very long anyway, arenas will again outperform traditional allocation schemes dealing with objects individually. 2001:4BB8:2DC:779A:B92F:464A:86BA:6A4B (talk) 16:38, 1 June 2025 (UTC)[reply]