/* bad socket ID */
if (socket_id != SOCKET_ID_ANY &&
+ free_memseg[i].socket_id != SOCKET_ID_ANY &&
socket_id != free_memseg[i].socket_id)
continue;
return memzone_reserve_aligned_thread_unsafe(name,
len, socket_id, 0, align, bound);
- RTE_LOG(ERR, EAL, "%s(%s, %zu, %d): "
- "No appropriate segment found\n",
- __func__, name, requested_len, socket_id);
rte_errno = ENOMEM;
return NULL;
}
/* Dump all reserved memory zones on console */
void
-rte_memzone_dump(void)
+rte_memzone_dump(FILE *f)
{
struct rte_mem_config *mcfg;
unsigned i = 0;
for (i=0; i<RTE_MAX_MEMZONE; i++) {
if (mcfg->memzone[i].addr == NULL)
break;
- printf("Zone %u: name:<%s>, phys:0x%"PRIx64", len:0x%zx"
+ fprintf(f, "Zone %u: name:<%s>, phys:0x%"PRIx64", len:0x%zx"
", virt:%p, socket_id:%"PRId32", flags:%"PRIx32"\n", i,
mcfg->memzone[i].name,
mcfg->memzone[i].phys_addr,