zptr.h File Reference

32bit -> 16bit pointer compression implementation More...

Detailed Description

32bit -> 16bit pointer compression implementation

Author
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e

Definition in file zptr.h.

#include <assert.h>
#include <stdint.h>
#include <inttypes.h>
+ Include dependency graph for zptr.h:

Go to the source code of this file.

Macros

#define PRIzptr   PRIu16
 zptr printf format definition
 
#define ZPTR_MAX_ADDR   ((uintptr_t)ZPTR_BASE + (1 << 18))
 zptr highest compressible address
 

Typedefs

typedef uint16_t zptr_t
 zptr type definition
 

Functions

static int zptr_check (void *pointer)
 Determine if a pointer is compressible by zptrc() More...
 
static zptr_t zptrc (void *pointer)
 Compress a pointer (if possible) More...
 
static void * zptrd (zptr_t zptr)
 Decompress a pointer. More...