Allocator.this

Warning g_allocator_new has been deprecated since version 2.10 and should not be used in newly-written code. Use the slice allocator instead Creates a new GAllocator.

  1. this(GAllocator* gAllocator)
  2. this(string name, uint nPreallocs)
    class Allocator
    this
    (
    string name
    ,)

Parameters

name string

the name of the GAllocator. This name is used to set the name of the GMemChunk used by the GAllocator, and is only used for debugging.

nPreallocs uint

the number of elements in each block of memory allocated. Larger blocks mean less calls to g_malloc(), but some memory may be wasted. (GLib uses 128 elements per block by default.) The value must be between 1 and 65535.

Throws

ConstructionException GTK+ fails to create the object.

Meta