| 183 | } |
| 184 | |
| 185 | int |
| 186 | XX_MallocSmartInit(void) |
| 187 | { |
| 188 | int error; |
| 189 | |
| 190 | error = E_OK; |
| 191 | mtx_lock(&XX_MallocSmartLock); |
| 192 | |
| 193 | if (XX_MallocSmartPool) |
| 194 | goto out; |
| 195 | |
| 196 | /* Allocate MallocSmart pool */ |
| 197 | XX_MallocSmartPool = contigmalloc(MALLOCSMART_POOL_SIZE, M_NETCOMMSW, |
| 198 | M_NOWAIT, 0, 0xFFFFFFFFFull, MALLOCSMART_POOL_SIZE, 0); |
| 199 | if (!XX_MallocSmartPool) { |
| 200 | error = E_NO_MEMORY; |
| 201 | goto out; |
| 202 | } |
| 203 | |
| 204 | out: |
| 205 | mtx_unlock(&XX_MallocSmartLock); |
| 206 | return (error); |
| 207 | } |
| 208 | |
| 209 | void * |
| 210 | XX_MallocSmart(uint32_t size, int memPartitionId, uint32_t alignment) |
nothing calls this directly
no test coverage detected