The latter is 8 bytes on a 64-bit system, which confirms that observed memory difference of 8 x 10 = 80MB makes sense. readmestata.doc 6 / Example: surveywho2007.do using surveywho2007.dta / clear set more 1 / Higher memory might be necessary for larger datasets / set memory 50m set maxvar 10000 / Indicate to the Stata compiler where the who2007. If you look at V8's source code ( Array::New, Heap::AllocateRawFixedArray, FixedArray::SizeFor), then you'll see that the memory used by an array is a fixed value plus the length multiplied by the size of a pointer. In this simple example, you can see that allocating an array of 10M elements consumers approximately 80MB (take a look at heapUsed). Here is an example from in Node v0.12.2 on a 64-bit system: $ node -expose-gc The built-in process module has a method memoryUsage that offers insight in the memory usage of the current Node.js process.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |