hl_mmap_mem_buf_alloc(9)
π NAME π
okay so this whole page is about hl_mmap_mem_buf_alloc(9) β yes bestie, straight from the Kernel API Manual β and its thing is: hl_mmap_mem_buf_alloc β allocate a new mappable buffer. slay β¨
π SYNOPSIS π
struct hl_mmap_mem_buf * hl_mmap_mem_buf_alloc (struct hl_mem_mgr *mmg ,
struct hl_mmap_mem_buf_behavior *behavior , gfp_t gfp , void *args );
π ARGUMENTS π
mmgβ parent unified memory manager. the big boss manager, iykyk πbehaviorβ behavior object describing this buffer polymorphic behavior. it's literally the vibe-setter for how this buffer behaves πgfpβ gfp flags to use for the memory allocations. allocation mood ring, but make it kernel πΈargsβ additional args passed tobehavior->alloc. extra lil' arguments handed off to the behavior's alloc, no cap π«Ά
π¦ DESCRIPTION π¦
okay so hl_mmap_mem_buf_alloc allocates and registers a shiny new memory buffer inside the given memory manager. that's the whole mission π
on success? it returns the pointer to the new buffer. on failure? NULL. literally that simple π
πΈ bestie note: success = pointer to the new buffer, failure = NULL. keep that energy.
π SEE ALSO π
Kernel file: ./drivers/accel/habanalabs/common/memory_mgr.c
go read these too, bestie:
hl_mmap_mem_buf_get(9)hl_mmap_mem_buf_destroy(9)hl_mmap_mem_buf_release(9)hl_mmap_mem_buf_remove_idr_locked(9)hl_mmap_mem_buf_put(9)hl_mmap_mem_buf_put_handle(9)hl_mmap_mem_buf_vm_close(9)hl_mem_mgr_mmap(9)hl_mem_mgr_init(9)hl_mem_mgr_fini(9)hl_mem_mgr_idr_destroy(9)
mwah π this page's source/version is ./drivers/accel/habanalabs/common, dated October 2026. bye bestie! π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms