Admin Production ni-theme
Current Publication

malloc

LabWindows/CVI

malloc

void *malloc (size_t memBlockSize);

Purpose

Allocates space for an object of specified size. The space allocated has indeterminate value.

Parameters

Input
Name Type Description
memBlockSize size_t Specifies the size in bytes of the space that is allocated.

Return Value

Name Type Description
memBlockPointer void * Contains a pointer to the memory block allocated. If the space cannot be allocated or if the size of the space requested is zero, the function returns a null pointer.

Additional Information

Library: ANSI C Library

Include file: ansi_c.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later

Examples

Refer to the following examples that use the malloc function:

  • apps\uirview\uirview.cws

    Open example
  • userint\clipbord.cws

    Open example
  • userint\GraphZooming.cws

    Open example
  • userint\gridview.cws

    Open example
  • userint\ICOViewer.cws

    Open example
  • userint\imagedit.cws

    Open example