MemoryChunk.this

Warning g_mem_chunk_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 GMemChunk.

  1. this(GMemChunk* gMemChunk)
  2. this(string name, int atomSize, gsize areaSize, int type)
    class MemoryChunk
    this
    (
    string name
    ,,,
    int type
    )

Parameters

name string

a string to identify the GMemChunk. It is not copied so it should be valid for the lifetime of the GMemChunk. It is only used in g_mem_chunk_print(), which is used for debugging.

atomSize int

the size, in bytes, of each element in the GMemChunk.

areaSize gsize

the size, in bytes, of each block of memory allocated to contain the atoms.

type int

the type of the GMemChunk. G_ALLOC_AND_FREE is used if the atoms will be freed individually. G_ALLOC_ONLY should be used if atoms will never be freed individually. G_ALLOC_ONLY is quicker, since it does not need to track free atoms, but it obviously wastes memory if you no longer need many of the atoms.

Throws

ConstructionException GTK+ fails to create the object.

Meta