X-Git-Url: https://git.llucax.com/software/dgc/cdgc.git/blobdiff_plain/587bbcb1896f084939cb30c4255de18d37eb6f84..ed2b4ee35ae9c3c6fb0f9c0a808c2945a843701a:/rt/gc/cdgc/dynarray.d diff --git a/rt/gc/cdgc/dynarray.d b/rt/gc/cdgc/dynarray.d index 5a83217..feddd98 100644 --- a/rt/gc/cdgc/dynarray.d +++ b/rt/gc/cdgc/dynarray.d @@ -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. *