I tried ---- int[] arr = new int[sizeOfItems]; ---- but if sizeOfItems is e.g. 512, it allocates 1024.So is there no way to allocate a fixed memory block without the usage of C functions?
Is there no way (besides the ugly malloc or any wrappers) to
allocate _exactly_ N elements at runtime (no static array)?
- Allocate N elements Namespace
- Re: Allocate N elements Adam D. Ruppe
- Re: Allocate N elements Namespace
- Re: Allocate N elements bearophile
- Re: Allocate N elements monarch_dodra
- Re: Allocate N elements bearophile
- Re: Allocate N elements monarch_dodra
- Re: Allocate N elements H. S. Teoh
- Re: Allocate N elements monarch_dodra
- Re: Allocate N elements Namespace
- Re: Allocate N elements Adam D. Ruppe