X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Fapplication%2Fshared_memory.cpp;fp=nucleus%2Flibrary%2Fapplication%2Fshared_memory.cpp;h=313a3c0d5dd7b7748bbc95da57d6ffd74c3317c2;hb=7b39f7e279005c8466ef508220a532ce2aa4abf8;hp=c26a09c52b627e6449574d956c628fd30e0a84c5;hpb=3fbd372b35b15a19fb171d5ae34294ff7b1e6485;p=feisty_meow.git diff --git a/nucleus/library/application/shared_memory.cpp b/nucleus/library/application/shared_memory.cpp index c26a09c5..313a3c0d 100644 --- a/nucleus/library/application/shared_memory.cpp +++ b/nucleus/library/application/shared_memory.cpp @@ -48,7 +48,7 @@ namespace application { shared_memory::shared_memory(int size, const char *identity) : _locking(new rendezvous(identity)), - _the_memory(NIL), + _the_memory(NULL_POINTER), _valid(false), _identity(new astring(identity)), _size(size) @@ -132,7 +132,7 @@ shared_memory::~shared_memory() ::CloseHandle(_the_memory); #else //hmmm: fix. - _the_memory = NIL; + _the_memory = NULL_POINTER; #endif WHACK(_locking); WHACK(_identity); @@ -181,10 +181,10 @@ void shared_memory::unlock(abyte * &to_unlock) abyte *shared_memory::locked_grab_memory() { FUNCDEF("locked_grab_memory") - abyte *to_return = NIL; + abyte *to_return = NULL_POINTER; if (!_the_memory) return to_return; #ifdef __UNIX__ - to_return = (abyte *)mmap(NIL, _size, PROT_READ | PROT_WRITE, + to_return = (abyte *)mmap(NULL_POINTER, _size, PROT_READ | PROT_WRITE, MAP_SHARED, int(_the_memory), 0); #elif defined(__WIN32__) to_return = (abyte *)::MapViewOfFile((HANDLE)_the_memory, FILE_MAP_ALL_ACCESS,