Zilog ZUSBOPTS Manual de usuario Pagina 454

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 520
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 453
Standard Functions UM017105-0511
426
Zilog Developer Studio II – ZNEO™
User Manual
Synopsis
#include <setjmp.h>
void longjmp(jmp_buf env, int val);
Returns
After longjmp is completed, program execution continues as if the corresponding call to
setjmp had just returned the value specified by val. The longjmp function cannot cause
setjmp to return the value 0; if val is 0, setjmp returns the value 1.
Example
int i;
jmp_buf env;
i=setjmp(env);
longjmp(env,i);
malloc
Allocates space for an object whose size is specified by size.
The existing implementation of malloc() depends on the heap area being located from
the bottom of the heap (referred to by the symbol __heapbot) to the top of the stack (SP).
Care must be taken to avoid holes in this memory range. Otherwise, the
malloc() func-
tion might not be able to allocate a valid memory object.
Synopsis
#include <stdlib.h>
void *malloc(size_t size);
Returns
A pointer to the start (lowest byte address) of the allocated space. If the space cannot be
allocated, or if size is zero, the
malloc function returns a null pointer.
Example
char *buf;
buf=(char *) malloc(40*sizeof(char));
if(buf !=NULL)
/*success*/
else
/*fail*/
Note:
Vista de pagina 453
1 2 ... 449 450 451 452 453 454 455 456 457 458 459 ... 519 520

Comentarios a estos manuales

Sin comentarios