Alright Eric. Thanks (Also Thanks Jacob) Good to know this is not a bug. I didnt know if it were a issue so in any case, i decided to report in case it was something.
The number passed looks a lot like one that would come from an undefined int, or something like int::max (it was much more than 8 GB in my case, but im not using the HEAD, so..). About the trap handler, i turn it on explicitly with '--wasm_trap_handler', and 'Reserve()' never got called before, and when i implemented, i was expecting that Reserve would ask me for a chunk of memory it would use later, so for start i've just delivered, like i would with Alloc, but in this case TCMalloc terminated the program with no memory, giving the size being asked. Giving the size being asked for was so big, i've assumed it was not right. But anyway, for what you are saying, v8 will first call Reserve and than will subsequently call Alloc when it really need the memory pages right? Thats a fine behavior to me.. For me Reserve 'social contract' (giving you have to hand back a buffer) would be that v8 want a larger chunk, where it would take care of managing this chunk, while Alloc is heap it would need right away, and where you should give it or die if theres not enough memory. Giving i tought the same dillema was true to Reserve behaviour (alloc this or die), i guessed it was impossible for v8 to being asked me for that ammount seriously.. this got to be some undefined int somewhere :) Anyway.. the trap handler will trigger when the wasm code try to access an out of bounds address? giving the source comes from C code, this is a very handy feature.. So for instance, in this case if i hand a initial ammount in Reserve() giving i can expect v8 to call Alloc() later for the real deal, i can just hand it back the heap i've reserved before with the right offset while the buffer has enough size? Thanks Jacob and Eric. -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
