---
title: OSMalloc_Tagfree
framework: kernel
role: symbol
role_heading: Function
path: kernel/1398439-osmalloc_tagfree
---

# OSMalloc_Tagfree

Frees a tag used with OSMalloc functions.

## Declaration

```occ
void OSMalloc_Tagfree(OSMallocTag tag);
```

## Parameters

- `tag`: The doc://com.apple.documentation/documentation/kernel/osmalloctag to free.

## Discussion

Discussion OSMalloc tags must not be freed while any memory blocks allocated with them still exist. Any OSMalloc function called on those blocks will result in a panic.

## See Also

### Memory

- [OSMalloc](kernel/1398447-osmalloc.md)
- [OSMalloc_Tagalloc](kernel/1398437-osmalloc_tagalloc.md)
- [OSMalloc_noblock](kernel/1398431-osmalloc_noblock.md)
- [OSMalloc_nowait](kernel/1398445-osmalloc_nowait.md)
- [OSFree](kernel/1398441-osfree.md)
- [bzero](kernel/1579350-bzero.md)
- [bzero_phys](kernel/1593364-bzero_phys.md)
