bd_mem_alloc
res = bd_mem_alloc(tag, flags);
mdid = bd_mem_alloc(tid, flags);
int bd_mem_alloc(int tid, u_int flags);