Nios® V Processor Software Developer Handbook

ID 743810
Date 9/26/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

12.1.1.7. alt_uncached_malloc()

Prototype

volatile void* alt_uncached_malloc (size_t size)

Commonly Called By

C/C++ programs

Device drivers

Thread-safe

Yes.

Available from ISR

No.

Include

<sys/alt_cache.h>

Description

The alt_uncached_malloc() routine guarantees that the allocated memory region is not in the data cache and that all subsequent accesses to the allocated memory regions bypass the data cache. In processors without data caches the alt_uncached_malloc() routine simply calls malloc().

Return

If sufficient memory cannot be allocated, this function returns null, otherwise a pointer to the allocated space is returned.