Reviewers: ishell,

Description:
Add SystemHeapAllocator and related utility classes

This SystemHeapAllocator class provides utility functions which
work with the SystemHeapAllocator defined in the public API, making
it more convenient to use.

SystemHeapAllocated is meant to be used as base class for objects
that are to be allocated using SystemHeapAllocator. It defines
operators to use placement-new with a SystemHeapAllocator, and
an allocator-aware Delete<T>() template function that must be
used instead of global delete operator.

The SystemHeapAllocatorObject class is intended to be used as a base
class for objects which are allocated via a SystemHeapAllocator. The
class defines custom new/delete operators. Allocation is done via
placement-new, and the allocator will embed a copy of itself (read:
a pointer) in the allocated memory area, so the delete operator can
retrieve it to perform the deallocation.

Functions v8::SystemHeapAllocator::{get,set}Default() access a static
global which is preinitialized to an allocator (LibcSystemHeapAllocator)
that uses the system C library malloc() and free() functions.

NOTE: This is the first patch in a series. Please check the associated
issue for details and an overview of the changes.

BUG=3001

Please review this at https://codereview.chromium.org/70553002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+151, -0 lines):
  M src/allocation.h
  M src/allocation.cc


--
--
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/groups/opt_out.

Reply via email to