Namensräume
Varianten
Aktionen

std::malloc

Aus cppreference.com
< cpp‎ | memory‎ | c

 
 
 
Dynamische Speicherverwaltung
Low-Level-Speicherverwaltung
Zuweiser
Original:
Allocators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
allocator
allocator_traits(C++11)
allocator_arg_t(C++11)
allocator_arg(C++11)
uses_allocator(C++11)
scoped_allocator_adaptor(C++11)
Initialisierter Speicher
Original:
Uninitialized storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
uninitialized_copy
uninitialized_copy_n(C++11)
uninitialized_fill
uninitialized_fill_n
raw_storage_iterator
get_temporary_buffer
return_temporary_buffer
Intelligente Zeiger
Original:
Smart pointers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unique_ptr(C++11)
shared_ptr(C++11)
weak_ptr(C++11)
auto_ptr(veraltet)
owner_less(C++11)
enable_shared_from_this(C++11)
bad_weak_ptr(C++11)
default_delete(C++11)
Garbage Collection Unterstützung
Original:
Garbage collection support
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
declare_reachable(C++11)
undeclare_reachable(C++11)
declare_no_pointers(C++11)
undeclare_no_pointers(C++11)
pointer_safety(C++11)
get_pointer_safety(C++11)
Verschiedenes
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
pointer_traits(C++11)
addressof(C++11)
align(C++11)
C-Bibliothek
Original:
C Library
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
malloc
calloc
 
Defined in header <cstdlib>
void* malloc( std::size_t size );
Ordnet size Bytes initialisierten Speicher .
Original:
Allocates size bytes of uninitialized storage.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Wenn Zuteilung erfolgreich ist, wird ein Zeiger auf die niedrigste (ersten) Byte in dem zugewiesenen Speicherblocks, die geeigneterweise für jeden Objekttyp ausgerichtet ist .
Original:
If allocation succeeds, returns a pointer to the lowest (first) byte in the allocated memory block that is suitably aligned for any object type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Wenn size Null ist, ist das Verhalten Implementierung definiert (NULL-Zeiger zurückgegeben werden, oder einige Nicht-NULL-Zeiger zurückgegeben, dass möglicherweise nicht verwendet werden, um Speicher zugreifen werden)
Original:
If size is zero, the behavior is implementation defined (null pointer may be returned, or some non-null pointer may be returned that may not be used to access storage)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten] Parameter

size -
Anzahl von Bytes, zuzuweisen
Original:
number of bytes to allocate
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Rückgabewert

Zeiger auf den Beginn des neu zugewiesenen Speicher oder Null-Zeiger, wenn der Fehler aufgetreten ist. Der Zeiger muss mit free() freigegeben werden .
Original:
Pointer to the beginning of newly allocated memory or null pointer if error has occurred. The pointer must be deallocated with free().
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Notes

Diese Funktion ist nicht Konstruktoren initialisieren oder Speicher in keiner Weise. So bevorzugte Methode der Speicherzuweisung ist new Ausdruck .
Original:
This function does not call constructors or initialize memory in any way. Thus preferred method of memory allocation is new expression.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Beispiel

[Bearbeiten] Siehe auch

Zuordnungsfunktionen
Original:
allocation functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion) [edit]
erhält initialisierten Speicher
Original:
obtains uninitialized storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktions-Template) [edit]
C documentation for malloc