# void \* le\_mem\_TryVarAlloc(le\_mem\_PoolRef\_t, size\_t)

- Defined in [File le\_mem.h](https://docs.qualcomm.com/doc/80-41102-2/topic/_doxygen_rst_file__doxygen_sources_include_le_mem_h.html#file-doxygen-sources-include-le-mem-h)

## Function Documentation

- void \*le\_mem\_TryVarAlloc([le\_mem\_PoolRef\_t](https://docs.qualcomm.com/doc/80-41102-2/topic/typedef_a00098_1a44a896f6a0a1a8c733e8038eb332989e.html#_CPPv416le_mem_PoolRef_t) pool, size\_t size)

    - Attempts to allocate an object from a pool.

- Parameters:

    - - **pool** – [IN] Pool from which the object is to be allocated.
- **size** – [IN] The size of block to allocate

- Returns:

    - Pointer to the allocated object, or NULL if the pool doesn’t have any free objects to allocate.

Last Published: Jun 09, 2026