Malloc

Visualizzazione dei risultati da 1 a 8 su 8
  1. #1
    gibibyte L'avatar di X-WING
    Registrato
    Jul 2001
    Località
    Roma
    Messaggi
    1,181

    Predefinito Malloc

    qualcuno sa di cosa si tratta?
    Mi è capitato in un test informatico per un concorso.......

    Salutix

  2. #2
    exbibyte L'avatar di guyver
    Registrato
    Jan 2001
    Località
    Catania
    Messaggi
    27,136

    Predefinito


  3. #3
    byte
    Registrato
    Sep 2000
    Località
    zona Roma
    Messaggi
    134

    Predefinito

    è una funzione che si usa nel linguaggio c e serve x allocare memoria x una qualche struttura dati

  4. #4
    Ghost Fighter L'avatar di frenc
    Registrato
    Jan 2001
    Messaggi
    24,668
    configurazione

    Predefinito

    konfermo...

    kuando viene dikiarato un puntatore kuesto inizialmente punta al nulla.
    mediante la kiamata malloc (memory alloc) lo si inizializza e da kuel momento punta ad una lokazione di memoria fornita dal sistema.

    malloc
    Allocates memory blocks.

    void *malloc( size_t size );

    Routine Required Header Compatibility
    malloc <stdlib.h> and <malloc.h> ANSI, Win 95, Win NT


    For additional compatibility information, see Compatibility in the Introduction.

    Libraries

    LIBC.LIB Single thread static library, retail version
    LIBCMT.LIB Multithread static library, retail version
    MSVCRT.LIB Import library for MSVCRT.DLL, retail version


    Return Value

    malloc returns a void pointer to the allocated space, or NULL if there is insufficient memory available. To return a pointer to a type other than void, use a type cast on the return value. The storage space pointed to by the return value is guaranteed to be suitably aligned for storage of any type of object. If size is 0, malloc allocates a zero-length item in the heap and returns a valid pointer to that item. Always check the return from malloc, even if the amount of memory requested is small.

    Parameter

    size

    Bytes to allocate

    Remarks

    The malloc function allocates a memory block of at least size bytes. The block may be larger than size bytes because of space required for alignment and maintenance information.

    .

  5. #5
    tebibyte L'avatar di Soul Reaver
    Registrato
    Mar 2001
    Località
    Piacenza
    Messaggi
    1,618

    Predefinito

    Originally posted by frenc
    konfermo...

    kuando viene dikiarato un puntatore kuesto inizialmente punta al nulla.
    mediante la kiamata malloc (memory alloc) lo si inizializza e da kuel momento punta ad una lokazione di memoria fornita dal sistema.

    malloc
    Allocates memory blocks.

    void *malloc( size_t size );

    Routine Required Header Compatibility
    malloc <stdlib.h> and <malloc.h> ANSI, Win 95, Win NT


    For additional compatibility information, see Compatibility in the Introduction.

    Libraries

    LIBC.LIB Single thread static library, retail version
    LIBCMT.LIB Multithread static library, retail version
    MSVCRT.LIB Import library for MSVCRT.DLL, retail version


    Return Value

    malloc returns a void pointer to the allocated space, or NULL if there is insufficient memory available. To return a pointer to a type other than void, use a type cast on the return value. The storage space pointed to by the return value is guaranteed to be suitably aligned for storage of any type of object. If size is 0, malloc allocates a zero-length item in the heap and returns a valid pointer to that item. Always check the return from malloc, even if the amount of memory requested is small.

    Parameter

    size

    Bytes to allocate

    Remarks

    The malloc function allocates a memory block of at least size bytes. The block may be larger than size bytes because of space required for alignment and maintenance information.

    .
    Che bello! Erano anni che non vedevo la malloc... dai tempi dell' ITIS!

  6. #6
    gibibyte L'avatar di X-WING
    Registrato
    Jul 2001
    Località
    Roma
    Messaggi
    1,181

    Predefinito

    Grazie a tutti

  7. #7
    Ghost Fighter L'avatar di frenc
    Registrato
    Jan 2001
    Messaggi
    24,668
    configurazione

    Predefinito

    nada...

    e ciao soul .

  8. #8
    tebibyte L'avatar di Soul Reaver
    Registrato
    Mar 2001
    Località
    Piacenza
    Messaggi
    1,618

    Predefinito

    Originally posted by frenc
    nada...

    e ciao soul .

Informazioni Thread

Users Browsing this Thread

Ci sono attualmente 1 utenti che stanno visualizzando questa discussione. (0 utenti e 1 ospiti)

Tags

Regole d'invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
nexthardware.com - © 2002-2022