FastLED 3.9.15
Loading...
Searching...
No Matches

◆ alloc_pool()

static void * fl::third_party::alloc_pool ( JDEC * jd,
size_t ndata )
static

Definition at line 141 of file tjpgd.cpp.hpp.

145{
146 char *rp = 0;
147
148
149 ndata = (ndata + 3) & ~3; /* Align block size to the word boundary */
150
151 if (jd->sz_pool >= ndata) {
152 jd->sz_pool -= ndata;
153 rp = (char*)jd->pool; /* Get start of available memory pool */
154 jd->pool = (void*)(rp + ndata); /* Allocate requierd bytes */
155 }
156
157 return (void*)rp; /* Return allocated memory block (NULL:no memory to allocate) */
158}

References FL_NOEXCEPT.

Referenced by create_huffman_tbl(), create_qt_tbl(), and jd_prepare().

+ Here is the caller graph for this function: