Skip to content

Conversation

@devnexen
Copy link
Collaborator

@devnexen devnexen commented Feb 9, 2021

work more realibly, in both mono and multi thread contexts.

Copy link
Member

@mjp41 mjp41 left a comment

Choose a reason for hiding this comment

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

I don't know these APIs, but could you clarify a little for me please. Thanks

{
SNMALLOC_ASSERT(
is_aligned_block<PALBSD::page_size>(p, size) || (zero_mem == NoZero));
os_unfair_lock lck = OS_UNFAIR_LOCK_INIT;
Copy link
Member

@mjp41 mjp41 Feb 9, 2021

Choose a reason for hiding this comment

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

Not sure if there are some crazy macro tricks here, but it looks like it should be static?

Suggested change
os_unfair_lock lck = OS_UNFAIR_LOCK_INIT;
static os_unfair_lock lck = OS_UNFAIR_LOCK_INIT;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

true

@devnexen devnexen force-pushed the mac_m1_fix_2 branch 2 times, most recently from 05480d5 to 0b50911 Compare February 10, 2021 09:56
Copy link
Member

@mjp41 mjp41 left a comment

Choose a reason for hiding this comment

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

LGTM


# include <errno.h>
# include <mach/vm_statistics.h>
# include <os/lock.h>
Copy link
Member

Choose a reason for hiding this comment

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

Unused header now?

work more realibly, in both mono and multi thread contexts.
@mjp41 mjp41 merged commit ee470c5 into microsoft:master Feb 11, 2021
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.

3 participants