Skip to content

Conversation

@digitalinfinity
Copy link
Contributor

@digitalinfinity digitalinfinity commented Sep 14, 2016

  1. BitVectors were not allocated as leaf, and this could cause the GC to interpret it's contents as pointer references. Switched to leaf
  2. Temporary guest-arenas that were being cached could still get scanned, even if they weren't actively being used. Added a mechanism to unregister said arena when it wasn't used.

1. BitVectors were not allocated as leaf, and this could cause the GC to interpret it's contents as pointer references. Switched to non-leaf
2. Temporary guest-arenas that were being cached could still get scanned, even if they weren't actively being used. Added a mechanism to unregister said arena when it wasn't used.
{
if (isGuestArena)
{
if (externalGuestArenaRef == nullptr)
Copy link
Contributor

@curtisman curtisman Sep 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we assert that externalGuestArenaRef != nullptr in

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we assert that externalGuestArenaRef != nullptr in AdviseNotInUse, should this be an assert externalGuestArenaRef == nullptr too?

Copy link
Contributor

@curtisman curtisman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment below.

public:

void AdviseInUse();
void AdviseNotInUse();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were the implementations of these already present?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No? Newly added

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Derp; I didn't see them above

@chakrabot chakrabot merged commit 746a9ec into chakra-core:master Sep 14, 2016
chakrabot pushed a commit that referenced this pull request Sep 14, 2016
Merge pull request #1581 from digitalinfinity:min_leaks

1. BitVectors were not allocated as leaf, and this could cause the GC to interpret it's contents as pointer references. Switched to leaf
2. Temporary guest-arenas that were being cached could still get scanned, even if they weren't actively being used. Added a mechanism to unregister said arena when it wasn't used.

char * Alloc(DECLSPEC_GUARD_OVERFLOW size_t requestedBytes);
char * AllocZero(DECLSPEC_GUARD_OVERFLOW size_t requestedBytes);
char * AllocLeaf(__declspec(guard(overflow)) size_t requestedBytes);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@digitalinfinity Strange, why CI did not complain on this? Should use DECLSPEC_GUARD_OVERFLOW

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

derp- I don't know? @dilijev any ideas? @jainchun, i'll make the change- sorry, had ported the change from Threshold and didn't notice the macro conversion 😞

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JIT is still disabled on Linux so this whole block is probably compiled out on Linux

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.

6 participants