www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - array capacities

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ever wondered about the capacity of an array?











































usage sample:























array.ptr);


array.ptr);


array.ptr);


array.ptr);









output:

 test            capacity        comment
 ----
 aa(2)           2
 aa(3)           3
 ----
 literal         0
 ----
 dynamic(5)      7       (stored at 0xF7C86F80)
 dynamic(7)      7       (stored at 0xF7C86F80)
 dynamic(8)      15      (stored at 0xF7C87FC0)
 dynamic(1)      15      (stored at 0xF7C87FC0)
 ----
 malloced        0
Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFPnOOLK5blCcjpWoRAg8GAJ9WReBKgw9GBBVNzdmKnbq51ciERgCgp8r9 zyFlZrAzOCt91ofZF5d8aO8= =+qPG -----END PGP SIGNATURE-----
Oct 24 2006