-
Notifications
You must be signed in to change notification settings - Fork 70
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
Shared memory bitmap allocator #443
Conversation
aligned memory allocation implemented
Evan/lib/shmem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OMG this is fantastic. A few notes, and a few requested changes, but I think it is good to go for now. I can pull now, or wait till you do a few tweaks (comments throughout). Up to you.
src/components/lib/shm_bm/shm_bm.h
Outdated
|
||
shmptr = entry->shmptr; | ||
// obj has not been allocated | ||
if (unlikely(*(SHM_BM_REFC(shmptr, nobj) + objid) == 0)) return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that this check actually has much utility. It is a subtle argument so we should chat about it at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this would be required since it is possible for a component to take a reference to an unallocated object otherwise. This might not be something we are worried about tho.
@@ -49,6 +49,18 @@ cos_faa(int *var, int value) | |||
return value; | |||
} | |||
|
|||
/* Byte sized fetch-and-add implementation on x86. It returns the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a note and/or empty function for this in arm that blows up?
Great job! looks really clean. |
Summary of this Pull Request (PR)
Client/Server Shared memory library
shm_bm
. Tested on x86_64.Intent for your PR
Choose one (Mandatory):
Reviewers (Mandatory):
(Specify @<github.com username(s)> of the reviewers. Ex: @user1, @user2)
Code Quality
As part of this pull request, I've considered the following:
Style:
Code Craftsmanship:
Testing
I've tested the code using the following test programs (provide list here):