X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Fapplication%2Fshared_memory.cpp;h=313a3c0d5dd7b7748bbc95da57d6ffd74c3317c2;hb=d7e8a05960951d8ce67e36c587726a851e2f5165;hp=c26a09c52b627e6449574d956c628fd30e0a84c5;hpb=fa30e6adff1dea5d6b3903279ef024dd3bed043f;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,