Bull DPX/20 Podręcznik Użytkownika Strona 61

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 424
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 60
SOM Kernel Reference 1-49
SOMRealloc Function
Purpose
Changes the size of a previously allocated region of memory.
Syntax
somToken (*SOMRealloc) (somToken ptr, size_t size);
Description
The SOMRealloc function changes the size of the previously allocated region of memory
pointed to by ptr so that it contains size bytes. The new size may be greater or less than
the original size. The SOMRealloc function has the same interface as the C realloc
function. It performs the same basic function as realloc with some supplemental error
checking. If an error occurs, the SOMError function is called. This routine is replaceable by
changing the value of the global variable SOMRealloc.
Parameters
ptr A pointer to the previously allocated region of memory. If NULL, a new
region of memory of size bytes is allocated.
size The size in bytes for the re-allocated storage. If zero, the memory pointed
to by ptr is freed.
Return Value
A pointer to the first byte of the re-allocated space. (A pointer is returned because the block
of storage may need to be moved to increase its size).
Related Information
Functions: SOMCalloc, SOMMalloc, SOMFree
Przeglądanie stron 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 423 424

Komentarze do niniejszej Instrukcji

Brak uwag