From 69cf9ac139d34c30b2312577b23382727c378012 Mon Sep 17 00:00:00 2001 From: TerryE Date: Wed, 24 Feb 2016 23:29:35 +0000 Subject: [PATCH] Correct typos in the node documentation --- docs/en/modules/node.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/en/modules/node.md b/docs/en/modules/node.md index e69707b1..af8beb7f 100644 --- a/docs/en/modules/node.md +++ b/docs/en/modules/node.md @@ -390,12 +390,16 @@ provides more detailed information on the EGC. #### Parameters - `mode` - - `node.ecg.NOT_ACTIVE` EGC inactive, no collection cycle will be forced in low memory situations - - `node.ecg.ON_ALLOC_FAILURE` Try to allocate a new block of memory, and run the garbage collector if the allocation fails. If the allocation fails even after running the garbage collector, the allocator will return with error. - - `node.ecg.ON_MEM_LIMIT` Tun the garbage collector when the memory used by the Lua script goes beyond an upper `limit`. If the upper limit can't be satisfied even after running the garbage collector, the allocator will return with error. - - `node.ecg.ALWAYS` Run the garbage collector before each memory allocation. If the allocation fails even after running the garbage collector, the allocator will return with error. This mode is very efficient with regards to memory savings, but it's also the slowest. -- `level` in the case of `node.ecg.ON_MEM_LIMIT`, this specifies the memory limit. + - `node.egc.NOT_ACTIVE` EGC inactive, no collection cycle will be forced in low memory situations + - `node.egc.ON_ALLOC_FAILURE` Try to allocate a new block of memory, and run the garbage collector if the allocation fails. If the allocation fails even after running the garbage collector, the allocator will return with error. + - `node.egc.ON_MEM_LIMIT` Run the garbage collector when the memory used by the Lua script goes beyond an upper `limit`. If the upper limit can't be satisfied even after running the garbage collector, the allocator will return with error. + - `node.egc.ALWAYS` Run the garbage collector before each memory allocation. If the allocation fails even after running the garbage collector, the allocator will return with error. This mode is very efficient with regards to memory savings, but it's also the slowest. +- `level` in the case of `node.egc.ON_MEM_LIMIT`, this specifies the memory limit. #### Returns `nil` +#### Example + +`node.egc.setmode(node.egc.ALWAYS, 4096) -- This is the default setting at startup.` +`node.egc.setmode(node.egc.ON_ALLOC_FAILURE) -- This is the fastest activeEGC mode.`