FastLED 3.10.8
Loading...
Searching...
No Matches
malloc.h
Go to the documentation of this file.
1#pragma once
2
3#include "fl/stl/stdint.h"
5#include "fl/stl/noexcept.h"
6
7namespace fl {
8 // Implementations. The public fl::name functions below are templates with an
9 // unused defaulted parameter, so wherever the C library version is also
10 // visible (ADL on an fl type, or a using-directive for fl) the non-template
11 // ::name wins the tie instead of the call being ambiguous (FastLED#4827).
12 namespace libc_impl {
13 void* malloc(size_t size) FL_NO_EXCEPT;
14 void free(void* ptr) FL_NO_EXCEPT;
15 void* calloc(size_t nmemb, size_t size) FL_NO_EXCEPT;
16 void* realloc(void* ptr, size_t new_size) FL_NO_EXCEPT;
17 } // namespace libc_impl
18
19 // Function declarations for memory management
20 template <typename FlLibcTag = void>
21 FASTLED_FORCE_INLINE void* malloc(size_t size) FL_NO_EXCEPT { return libc_impl::malloc(size); }
22 template <typename FlLibcTag = void>
23 FASTLED_FORCE_INLINE void free(void* ptr) FL_NO_EXCEPT { return libc_impl::free(ptr); }
24 template <typename FlLibcTag = void>
25 FASTLED_FORCE_INLINE void* calloc(size_t nmemb, size_t size) FL_NO_EXCEPT { return libc_impl::calloc(nmemb, size); }
26 template <typename FlLibcTag = void>
27 FASTLED_FORCE_INLINE void* realloc(void* ptr, size_t new_size) FL_NO_EXCEPT { return libc_impl::realloc(ptr, new_size); }
28} // namespace fl
#define FASTLED_FORCE_INLINE
void free(void *ptr) FL_NO_EXCEPT
void * realloc(void *ptr, size_t new_size) FL_NO_EXCEPT
void * calloc(size_t nmemb, size_t size) FL_NO_EXCEPT
void * malloc(size_t size) FL_NO_EXCEPT
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
FASTLED_FORCE_INLINE void free(void *ptr) FL_NO_EXCEPT
Definition malloc.h:23
FASTLED_FORCE_INLINE void * calloc(size_t nmemb, size_t size) FL_NO_EXCEPT
Definition malloc.h:25
FASTLED_FORCE_INLINE void * malloc(size_t size) FL_NO_EXCEPT
Definition malloc.h:21
FASTLED_FORCE_INLINE void * realloc(void *ptr, size_t new_size) FL_NO_EXCEPT
Definition malloc.h:27
Base definition for an LED controller.
Definition crgb.hpp:179