N
not_a_commie
I've got a search algorithm where I would like to allocate my nodes in
blocks. In other words, I would like to reserve enough memory for 200k
nodes and then just keep my own pointer into that block. I don't want
to do 200k small memory allocation calls. It seemed that this made
more sense when I was using structs. I could allocate a struct node[]
and then just work through that as I needed more nodes. Can I do the
same thing with classes?
blocks. In other words, I would like to reserve enough memory for 200k
nodes and then just keep my own pointer into that block. I don't want
to do 200k small memory allocation calls. It seemed that this made
more sense when I was using structs. I could allocate a struct node[]
and then just work through that as I needed more nodes. Can I do the
same thing with classes?