carta
rdsfree(3)

rdsfree3

Free memory place

Synopsys

 #include "rdsnnn.h"
  void  rdsfree( Pointer, Size )
    char         ∗Pointer;
    unsigned int  Size;

Parameter

Pointer

pointer to the memory to free.

Size

Size of the memory to free.

Overview

The rdsfree function deletes memory of size=´Size´ allocated with rdsalloc function. If the parameter Size is set to ZERO (or RDS_ALLOC_BLOCK) then the memory is deleted by BLOCK else the memory is deleted by HEAP.

Note : A memory allocated by BLOCK (resp. by HEAP) must be deleted by BLOCK (resp. by HEAP).

Return value

nothing

Errors

none

Examples

          #include "rdsnnn.h"
	    main()
	     {
	       rdsrec_list ∗Rectangle;
	       rdsfig_list ∗Figure;
               Figure    = allocrdsfig ();
	       Rectangle = allocrdsrec ();
	       Rectangle->X  = 20;
	       Rectangle->Y  = 20;
	       Rectangle->DX = 48;
	       Rectangle->DY = 8;
	       ...
	       /∗ ∗/ rdsfree ( Rectangle, sizeof (rdsrec_list));
               /∗ deletes a figure allocated by block ∗/
               /∗ ∗/ rdsfree ( Figure , RDS_ALLOC_BLOCK);
	     }

History

  • Debian 10 (Buster) to Debian 9 (Stretch): the text shown here
  • Debian 8 (Jessie) to Debian 7 (Wheezy)

From alliance 5.1.1-3 in Debian 10 (Buster). Parsed by carta from the page's man source.