adapted to new storage location
[feisty_meow.git] / nucleus / library / application / shared_memory.cpp
index 4dab6191bba01b2298100bdf616bedf7706f9a62..313a3c0d5dd7b7748bbc95da57d6ffd74c3317c2 100644 (file)
@@ -48,12 +48,12 @@ 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)
 {
-//  FUNCDEF("constructor");
+  FUNCDEF("constructor");
   bool first_use = false;  // assume already existing until told otherwise.
   _locking->lock();  // force all others to wait on our finishing creation.
 #ifdef __UNIX__
@@ -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,