November 21, 2009 Re: Conspiracy Theory #1 | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | Nick Sabalausky wrote:
> "dsimcha" <dsimcha@yahoo.com> wrote in message news:he6aah$4d6$1@digitalmars.com...
>> == Quote from Denis Koroskin (2korden@gmail.com)'s article
>>> Aren't uint array allocations have hasPointers flag set off? I always
>>> thought they aren't scanned for pointers (unlike, say, void[]).
>> Right, but they can still be the target of false pointers. In this case, false
>> pointers keep each instance of foo[] alive, leading to severe memory leaks.
>
> I don't suppose there's a way to lookup the pointers the GC believes it has found to a given piece of GC-ed memory? Sounds like that would be very useful, if not essential, for debugging/optimizing memory usage.
>
>
Maybe extend the GC interface so the compiler and language in general will give hints on what the memory is being used for. This could even be extended to application code as well.
MEM_OBJECT, MEM_STRUCT, MEM_PTRARRY, MEM_ARRAY, etc. (I haven't fully thought this through so these examples may be bad).
Then the GC implementations can decide how to allocate the memory in the best way for the underlying architecture. I know this would be useful on weird memory layouts found in embedded machines (NDS for example), but could also be extended language-wise to other hardware memory areas. For example, allocating memory on video cards or DSP hardware.
Like I said, this isn't something I have thought through much, and I don't know how much (if any) compiler/GC interface support would be required.
| |||
November 21, 2009 Re: Conspiracy Theory #1 | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Rainer Deyke | Rainer Deyke wrote:
> dsimcha wrote:
>> == Quote from Rainer Deyke (rainerd@eldwood.com)'s article
>>> Yes, but a moving GC needs to be 100% precise, not 99.99999%.
>>
>> Not if you allow pinning, which we'd need anyhow for untyped, conservatively scanned memory blocks.
>
> If you allow pinning then you no longer get the full benefits of a moving gc. It would be nice to be able to trade untyped, conservatively scanned memory blocks for a better gc.
>
>
Is it possible to allocate 'pinnable' objects from a different heap and still have your normal objects managed by an optimal moving gc?
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply