X-Git-Url: https://git.llucax.com/software/dgc/cdgc.git/blobdiff_plain/587bbcb1896f084939cb30c4255de18d37eb6f84..39229a694674a24ad2d3b9203f591198b7c60ca7:/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. *