Lines Matching refs:memory_pool
311 priv->memory_pool[i].start = payload_addr; in init_memory()
312 priv->memory_pool[i].size = BLOCK_1_SIZE; in init_memory()
313 priv->memory_pool[i].free = 1; in init_memory()
314 payload_addr += priv->memory_pool[i].size; in init_memory()
319 priv->memory_pool[curr + i].start = payload_addr; in init_memory()
320 priv->memory_pool[curr + i].size = BLOCK_2_SIZE; in init_memory()
321 priv->memory_pool[curr + i].free = 1; in init_memory()
322 payload_addr += priv->memory_pool[curr + i].size; in init_memory()
327 priv->memory_pool[curr + i].start = payload_addr; in init_memory()
328 priv->memory_pool[curr + i].size = BLOCK_3_SIZE; in init_memory()
329 priv->memory_pool[curr + i].free = 1; in init_memory()
330 payload_addr += priv->memory_pool[curr + i].size; in init_memory()
333 WARN_ON(payload_addr - priv->memory_pool[0].start > PAYLOAD_AREA_SIZE); in init_memory()
347 if (priv->memory_pool[i].size >= qtd->length && in alloc_mem()
348 priv->memory_pool[i].free) { in alloc_mem()
349 priv->memory_pool[i].free = 0; in alloc_mem()
350 qtd->payload_addr = priv->memory_pool[i].start; in alloc_mem()
365 if (priv->memory_pool[i].start == qtd->payload_addr) { in free_mem()
366 WARN_ON(priv->memory_pool[i].free); in free_mem()
367 priv->memory_pool[i].free = 1; in free_mem()