]> git.llucax.com Git - software/dgc/cdgc.git/blobdiff - rt/gc/cdgc/dynarray.d
Improve variable names for block attributes
[software/dgc/cdgc.git] / rt / gc / cdgc / dynarray.d
index 5a83217fba9b0bf519c5cc3addccb9018e4b6143..feddd985411c8842742b498d2da286a48c87635b 100644 (file)
@@ -79,6 +79,14 @@ public:
         return this._capacity;
     }
 
+    /**
+     * Get the total ammount of bytes the array consumes.
+     */
+    size_t size_of()
+    {
+        return this.sizeof + this._capacity * (T.sizeof + (T*).sizeof);
+    }
+
     /**
      * Get the pointer to the array's data.
      *