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

Question about memory layout #21

Open
drghirlanda opened this issue Feb 9, 2024 · 0 comments
Open

Question about memory layout #21

drghirlanda opened this issue Feb 9, 2024 · 0 comments

Comments

@drghirlanda
Copy link

Hi, and thanks for this module! I am having it inter-operate with a C program using the POSIX shm_* functions. I have noticed that, from the point of view of C, it seems that the module considers the data to start two elements past the initial shared memory address. It also seems that it uses the first element to store the number of elements. Is this correct? Is there a use for the second element of shared memory?

If I just take into account this 2-element offset, everything seems to work fine, I can create shared memory in C or JS (under node), and read from and write to it from both C and JS.

Thanks!

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

No branches or pull requests

1 participant