ukrbublik / shm-typed-array

IPC shared memory for NodeJs. Use as Buffer or TypedArray.
MIT License
71 stars 9 forks source link

Memeory key type changed(int->unsigned long) #5

Closed KazukiHiraizumi closed 5 years ago

KazukiHiraizumi commented 5 years ago

Maybe on 64bits system, "key" should be 32bits long

ukrbublik commented 5 years ago

typedef __int32_t key_t; /* IPC key (for Sys V IPC) */

ukrbublik commented 5 years ago

I don't see point in changing type to unsigned long.

KazukiHiraizumi commented 5 years ago

Sorry, this may be the compiler problem. My environment made this variable 16bits long.

ukrbublik commented 5 years ago

What compiler are you using? And what OS, CPU?

KazukiHiraizumi commented 5 years ago

My system is Linux Mint 18.2, "uname -a" tells like this

Linux ca-W517PU 4.8.0-53-generic #56~16.04.1-Ubuntu SMP Tue May 16 01:18:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

NodeJS version is 9. A few days ago , I did "apt upgrade", and now I found your code is working well.

ukrbublik commented 5 years ago

Ok, so I can close this PR?

KazukiHiraizumi commented 5 years ago

Sure! дякую Arigato