Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dart VM GC needs an API to indicate external memory pressure #11471

Closed
sgjesse opened this issue Jun 24, 2013 · 5 comments
Closed

Dart VM GC needs an API to indicate external memory pressure #11471

sgjesse opened this issue Jun 24, 2013 · 5 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.

Comments

@sgjesse
Copy link
Contributor

sgjesse commented Jun 24, 2013

When Dart objects are holding on to external memory, e.g. when typed data objects are allocated with external memory for backing store, there is no way for the GC to know that running a GC could free much more memory that what the VM heap holds.

V8 has the API AdjustAmountOfExternalAllocatedMemory (https://code.google.com/p/v8/source/browse/branches/bleeding_edge/include/v8.h#­3909) to indicate the amount of external memory kept alive by the V8 heap.

Dart could have an API like this or the number of external bytes could be aded to some other API where the finalization is registered, to avoid the need to two matching calls to increment and decrement the number of external bytes

@andersjohnsen
Copy link

This is starting to hit 'pub serve' as well. See https://code.google.com/p/dart/issues/detail?id=13848.

@iposva-google
Copy link
Contributor

Set owner to @iposva-google.
Added Accepted label.

@iposva-google
Copy link
Contributor

Changed the title to: "Dart VM GC needs an API to indicate external memory pressure".

@kodandersson
Copy link
Contributor

cc @iposva-google.
Set owner to @kodandersson.

@sgjesse sgjesse added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. labels Mar 3, 2014
@kodandersson
Copy link
Contributor

I implemented this a long time ago; see "external_allocation_size" parameters in dart_api.h.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

4 participants