]> git.saurik.com Git - apple/xnu.git/blobdiff - libkern/c++/OSSymbol.cpp
xnu-792.22.5.tar.gz
[apple/xnu.git] / libkern / c++ / OSSymbol.cpp
index ebaebabfa06364a902d25b36ad5f60abb87e7191..c21bd466bacd23b4da88ca5a0e6dffdaf23e923e 100644 (file)
@@ -119,7 +119,7 @@ void * OSSymbolPool::operator new(size_t size)
 
 void OSSymbolPool::operator delete(void *mem, size_t size)
 {
-    kfree((vm_offset_t)mem, size);
+    kfree(mem, size);
     ACCUMSIZE(-size);
 }
 
@@ -151,12 +151,12 @@ OSSymbolPool::OSSymbolPool(const OSSymbolPool *old)
 OSSymbolPool::~OSSymbolPool()
 {
     if (buckets) {
-        kfree((vm_offset_t)buckets, nBuckets * sizeof(Bucket));
+        kfree(buckets, nBuckets * sizeof(Bucket));
         ACCUMSIZE(-(nBuckets * sizeof(Bucket)));
     }
 
     if (poolGate)
-        kfree((vm_offset_t) poolGate, 36 * 4);
+        kfree(poolGate, 36 * 4);
 }
 
 unsigned long OSSymbolPool::log2(unsigned int x)
@@ -301,7 +301,7 @@ OSSymbol *OSSymbolPool::insertSymbol(OSSymbol *sym)
     /* @@@ gvdl: Zero test and panic if can't set up pool */
     list[0] = sym;
     bcopy(thisBucket->symbolP, list + 1, j * sizeof(OSSymbol *));
-    kfree((vm_offset_t)thisBucket->symbolP, j * sizeof(OSSymbol *));
+    kfree(thisBucket->symbolP, j * sizeof(OSSymbol *));
     ACCUMSIZE(-(j * sizeof(OSSymbol *)));
     thisBucket->symbolP = list;
     if (count > nBuckets)
@@ -340,7 +340,7 @@ void OSSymbolPool::removeSymbol(OSSymbol *sym)
         probeSymbol = list[0];
         if (probeSymbol == sym) {
             thisBucket->symbolP = (OSSymbol **) list[1];
-            kfree((vm_offset_t)list, 2 * sizeof(OSSymbol *));
+            kfree(list, 2 * sizeof(OSSymbol *));
            ACCUMSIZE(-(2 * sizeof(OSSymbol *)));
             count--;
             thisBucket->count--;
@@ -350,7 +350,7 @@ void OSSymbolPool::removeSymbol(OSSymbol *sym)
         probeSymbol = list[1];
         if (probeSymbol == sym) {
             thisBucket->symbolP = (OSSymbol **) list[0];
-            kfree((vm_offset_t)list, 2 * sizeof(OSSymbol *));
+            kfree(list, 2 * sizeof(OSSymbol *));
            ACCUMSIZE(-(2 * sizeof(OSSymbol *)));
             count--;
             thisBucket->count--;
@@ -373,7 +373,7 @@ void OSSymbolPool::removeSymbol(OSSymbol *sym)
                 bcopy(thisBucket->symbolP + thisBucket->count-j,
                       list + thisBucket->count-1-j,
                       j * sizeof(OSSymbol *));
-            kfree((vm_offset_t)thisBucket->symbolP, thisBucket->count * sizeof(OSSymbol *));
+            kfree(thisBucket->symbolP, thisBucket->count * sizeof(OSSymbol *));
            ACCUMSIZE(-(thisBucket->count * sizeof(OSSymbol *)));
             thisBucket->symbolP = list;
             count--;