Commit Graph

2 Commits

Author SHA1 Message Date
Jeff Walden
6b92eb239e *Fewer* *occurrences*, not "less occurences". r=languagenazi 2011-06-23 11:07:27 -07:00
Paul Biggar
72c7701093 Bug 634155: Account for NewCompartment's memory, and change allocation APIs (r=nnethercote)
This changes the allocation API, in the following way:

  js_malloc -> {cx->,rt->,OffTheBooks::}malloc
  js_calloc -> {cx->,rt->,OffTheBooks::}calloc
  js_realloc -> {cx->,rt->,OffTheBooks::}realloc
  js_free -> {cx->,rt->,Foreground::,UnwantedForeground::}free
  js_new -> {cx->,rt->,OffTheBooks::}new_
  js_new_array -> {cx->,rt->,OffTheBooks::}new_array
  js_delete -> {cx->,rt->,Foreground::,UnwantedForeground::}delete_

This is to move as many allocations as possible through a JSContext (so that they may be aken into account by gcMallocBytes) and to move as many deallocations to the background as possible (except on error paths).
2011-03-31 01:13:49 -07:00