[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: When should ralloc.c be used?
From: |
Stefan Monnier |
Subject: |
Re: When should ralloc.c be used? |
Date: |
Tue, 25 Oct 2016 15:27:27 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) |
>> IIUC releasing memory with sbrk can only be done if that memory is at
>> the end of the heap.
> Since ralloc.c relocates blocks, it can make this happen more easily.
But the sbrk area is shared with gmalloc, whose data is not relocatable,
so as soon as gmalloc calls sbrk, the space previously allocated by
ralloc can't be returned any more.
>> > It seems ralloc is actually at an advantage, because relocating blocks
>> > helps collect together a larger free block.
>> mmap can always free what it has allocated before, without any need to
>> relocate anything.
> It makes no sense to release random pages here and there, all you get
> is fragmentation at address space level.
Yes, but address space is much more plentiful.
Note that glibc uses exactly this approach and it works very well for us.
Stefan
- Re: When should ralloc.c be used?, (continued)
- Re: When should ralloc.c be used?, Eli Zaretskii, 2016/10/24
- Re: When should ralloc.c be used?, Daniel Colascione, 2016/10/24
- Re: When should ralloc.c be used?, Eli Zaretskii, 2016/10/24
- Re: When should ralloc.c be used?, Richard Stallman, 2016/10/24
- Re: When should ralloc.c be used?, Stefan Monnier, 2016/10/25
- Re: When should ralloc.c be used?, Stefan Monnier, 2016/10/25
- Re: When should ralloc.c be used?, Stefan Monnier, 2016/10/24
- Re: When should ralloc.c be used?, Eli Zaretskii, 2016/10/24
- Re: When should ralloc.c be used?, Stefan Monnier, 2016/10/25
- Re: When should ralloc.c be used?, Eli Zaretskii, 2016/10/25
- Re: When should ralloc.c be used?,
Stefan Monnier <=
- Re: When should ralloc.c be used?, Ken Raeburn, 2016/10/24
- Re: When should ralloc.c be used?, Eli Zaretskii, 2016/10/25
- Re: When should ralloc.c be used?, Ken Raeburn, 2016/10/26
- Re: When should ralloc.c be used?, Eli Zaretskii, 2016/10/26
- Re: When should ralloc.c be used?, Ken Raeburn, 2016/10/27
- Re: When should ralloc.c be used?, Eli Zaretskii, 2016/10/24
- Re: When should ralloc.c be used?, Stefan Monnier, 2016/10/24
- Re: When should ralloc.c be used?, Eli Zaretskii, 2016/10/24
- Re: When should ralloc.c be used?, Stefan Monnier, 2016/10/24
- Re: When should ralloc.c be used?, Eli Zaretskii, 2016/10/24