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

clear expirableObjectDisposeList at the end of disposal all objects #2739

Merged
merged 1 commit into from
Mar 28, 2017

Conversation

leirocks
Copy link
Contributor

currently removing one by one from this linked list is slow, might cause hang
remove an uncessary Assert (expirableObjectDisposeList is not null as long as recycler is not null)

currently removing one by one from this linked list is slow, might cause hang
remove an uncessary Assert (expirableObjectDisposeList is not null as long as recycler is not null)
@digitalinfinity
Copy link
Contributor

Theoretically, this is a possible leak now, no? Before, we'd queue up the freed entries in the free list- now we don't. It's arena though so it'll eventually free it, but for single-page apps this can regress memory usage.

@leirocks
Copy link
Contributor Author

the Clear() will call the delete:

    template <typename TAllocator>
    void Clear(TAllocator * allocator)
    {
        NodeBase * current = this->Next();
        while (!this->IsHead(current))
        {
            NodeBase * next = current->Next();
            AllocatorDelete(TAllocator, allocator, (Node *)current);
            current = next;
        }

        this->Next() = this;
        this->Prev() = this;
        this->SetCount(0);
    }

@leirocks
Copy link
Contributor Author

@dotnet-bot test Ubuntu shared_ubuntu_linux_debug please

@leirocks
Copy link
Contributor Author

@dotnet-bot test Ubuntu static_ubuntu_linux_release please

@chakrabot chakrabot merged commit d74f27f into chakra-core:master Mar 28, 2017
chakrabot pushed a commit that referenced this pull request Mar 28, 2017
…f disposal all objects

Merge pull request #2739 from leirocks:expiredispose

currently removing one by one from this linked list is slow, might cause hang
remove an uncessary Assert (expirableObjectDisposeList is not null as long as recycler is not null)
@leirocks leirocks deleted the expiredispose branch March 30, 2017 17:04
leirocks added a commit to leirocks/ChakraCore that referenced this pull request Apr 6, 2017
to avoid linear searching the list to do the removal which can cause busy hang
this is a more completed fix for chakra-core#2739
chakrabot pushed a commit that referenced this pull request Apr 13, 2017
…jects

Merge pull request #2792 from leirocks:expireDisLst

to avoid linear searching the list to do the removal which can cause busy hang
this is a more completed fix for #2739
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants