[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: When should ralloc.c be used?
From: |
Eli Zaretskii |
Subject: |
Re: When should ralloc.c be used? |
Date: |
Tue, 25 Oct 2016 19:36:54 +0300 |
> From: Stefan Monnier <address@hidden>
> Date: Tue, 25 Oct 2016 10:12:23 -0400
>
> >> That's why I said "basically". Yes, in theory it can sometimes
> >> return memory. In practice, this is rare. In contrast, with mmap,
> >> returning memory to the OS is the rule rather than the exception.
> > How so? Releasing memory in both cases requires basically the same
> > situation: a large enough block of contiguous memory not in use.
>
> 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.
> > 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.
- Re: When should ralloc.c be used?, (continued)
- 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?, 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 <=
- Re: When should ralloc.c be used?, Stefan Monnier, 2016/10/25
- 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