R internal memory allocation error handling -


i had question regarding triggering of error when memory allocation tries exceed memory.limit() such in

> test <- 1:1e10 error: cannot allocate vector of size 74.5 gb in addition: warning messages: 1: reached total allocation of 3975mb: see help(memory.size)  2: reached total allocation of 3975mb: see help(memory.size)  3: reached total allocation of 3975mb: see help(memory.size)  4: reached total allocation of 3975mb: see help(memory.size) 

my main question how error message invoked? memory allocation event , r has internal event listener or function called before assignment of variable check estimated memory usage? if second true, can theoretically turn function off?


ad comments:

sorry, still don't it. error come from, meaning process responsible error message? how r know object exceeds allocation , return error?
seems there 2 possibilities:

  • r tries create object - system (or other processs) returns allocation not possible - r breaks execution , throws error -> feels event handling

  • r estimates object.size(1:1e10) internal functions , before variable created calls stop(...)

please correct me if got wrong!


ad comments (joshua ulrich):

okay, how r communicate memory?


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -