It may not be platform dependent, but I will fix it in Win 10 GCC anyway.
Suppose you create an array or vector consisting of elements, each of which can have a variable size, in a static memory space in main ():
RADIAL_UNITS = 1000000;
static vector<Pearl> necklace[RADIAL_UNITS] = { };
or allocated on the stack in main () (assuming that the stack space has a resolution of at least 1,000,000 memory addresses):
vector<Pearl> necklace[RADIAL_UNITS] = { };
I assume that at runtime it necklaceconsists of RADIAL_UNITScontiguous memory addresses, pointing to elements vector<Pearl>. What I donβt understand is in (i), in what memory space the elements of the vector are (I suspect a lot of space) .
Side questions that interest me:
(ii), , . STL - , ? , , , ( , .. , , segfault, ), (iii) , 50*sizeof(Pearl), , ? , .