mi-malloc 1.8/2.1
 
Lade...
Suche...
Keine Treffer
Typisierte Makros

Typisierte Allokationsmakros. Mehr...

Makros

#define mi_malloc_tp(tp)
 Allokiert einen Block vom Typ tp.
 
#define mi_zalloc_tp(tp)
 Allokiert einen null-initialisierten Block vom Typ tp.
 
#define mi_calloc_tp(tp, count)
 Allokiert count null-initialisierte Blöcke vom Typ tp.
 
#define mi_mallocn_tp(tp, count)
 Allokiert count Blöcke vom Typ tp.
 
#define mi_reallocn_tp(p, tp, count)
 Re-allokiert zu count Blöcken vom Typ tp.
 
#define mi_heap_malloc_tp(hp, tp)
 Allokiert einen Block vom Typ tp in einem Heap hp.
 
#define mi_heap_zalloc_tp(hp, tp)
 Allokiert einen null-initialisierten Block vom Typ tp in einem Heap hp.
 
#define mi_heap_calloc_tp(hp, tp, count)
 Allokiert count null-initialisierte Blöcke vom Typ tp in einem Heap hp.
 
#define mi_heap_mallocn_tp(hp, tp, count)
 Allokiert count Blöcke vom Typ tp in einem Heap hp.
 
#define mi_heap_reallocn_tp(hp, p, tp, count)
 Re-allokiert zu count Blöcken vom Typ tp in einem Heap hp.
 
#define mi_heap_recalloc_tp(hp, p, tp, count)
 Re-allokiert zu count null-initialisierten Blöcken vom Typ tp in einem Heap hp.
 

Detaillierte Beschreibung

Typisierte Allokationsmakros.

Zum Beispiel

int* p = mi_malloc_tp(int)
#define mi_malloc_tp(tp)
Allokiert einen Block vom Typ tp.
Definition mimalloc-doc.h:784

Dokumentation der Makrodefinition

◆ mi_calloc_tp

#define mi_calloc_tp ( tp,
count )

Allokiert count null-initialisierte Blöcke vom Typ tp.

◆ mi_heap_calloc_tp

#define mi_heap_calloc_tp ( hp,
tp,
count )

Allokiert count null-initialisierte Blöcke vom Typ tp in einem Heap hp.

◆ mi_heap_malloc_tp

#define mi_heap_malloc_tp ( hp,
tp )

Allokiert einen Block vom Typ tp in einem Heap hp.

◆ mi_heap_mallocn_tp

#define mi_heap_mallocn_tp ( hp,
tp,
count )

Allokiert count Blöcke vom Typ tp in einem Heap hp.

◆ mi_heap_reallocn_tp

#define mi_heap_reallocn_tp ( hp,
p,
tp,
count )

Re-allokiert zu count Blöcken vom Typ tp in einem Heap hp.

◆ mi_heap_recalloc_tp

#define mi_heap_recalloc_tp ( hp,
p,
tp,
count )

Re-allokiert zu count null-initialisierten Blöcken vom Typ tp in einem Heap hp.

◆ mi_heap_zalloc_tp

#define mi_heap_zalloc_tp ( hp,
tp )

Allokiert einen null-initialisierten Block vom Typ tp in einem Heap hp.

◆ mi_malloc_tp

#define mi_malloc_tp ( tp)

Allokiert einen Block vom Typ tp.

Parameter
tpDer Typ des zu allokierenden Blocks.
Rückgabe
Ein Zeiger auf ein Objekt vom Typ tp oder NULL, wenn der Speicher voll ist.

Beispiel

int* p = mi_malloc_tp(int)
Siehe auch
mi_malloc()

◆ mi_mallocn_tp

#define mi_mallocn_tp ( tp,
count )

Allokiert count Blöcke vom Typ tp.

◆ mi_reallocn_tp

#define mi_reallocn_tp ( p,
tp,
count )

Re-allokiert zu count Blöcken vom Typ tp.

◆ mi_zalloc_tp

#define mi_zalloc_tp ( tp)

Allokiert einen null-initialisierten Block vom Typ tp.