Loading...
Searching...
No Matches
ptrtag.h File Reference

Pointer Tagging Helpers. More...

Detailed Description

Pointer Tagging Helpers.

Author
Marian Buschsieweke maria.nosp@m.n.bu.nosp@m.schsi.nosp@m.ewek.nosp@m.e@ovg.nosp@m.u.de

Definition in file ptrtag.h.

#include <assert.h>
#include <inttypes.h>
#include <stdint.h>
+ Include dependency graph for ptrtag.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PTRTAG   __attribute__((aligned(4)))
 Pointers to data marked with this attribute will be tag-able.
 

Functions

static void * ptrtag (void *ptr, uint8_t tag)
 Create a tagged pointer.
 
static void * ptrtag_ptr (void *tagged_ptr)
 Extract the original pointer from a tagged pointer.
 
static uint8_t ptrtag_tag (void *tagged_ptr)
 Extract the tag from a tagged pointer.