DWARF_DEALLOC(3)
π DWARF_DEALLOC(3) π
okay bestie, welcome to DWARF_DEALLOC(3) from the Library Functions Manual β¨ This one is all about releasing resources in libdwarf, plus a whole little squad of compatibility functions that are lowkey just chilling. Letβs get into it π«Ά
π NAME π
dwarf_deallocdwarf_fde_cie_list_deallocdwarf_funcs_deallocdwarf_globals_deallocdwarf_pubtypes_deallocdwarf_ranges_deallocdwarf_srclines_deallocdwarf_types_deallocdwarf_vars_deallocdwarf_weaks_dealloc
β release resources π
π LIBRARY π
DWARF Access Library (libdwarf, -ldwarf) π
β¨ SYNOPSIS β¨
#include <libdwarf.h>
void
dwarf_dealloc(Dwarf_Debug dbg, Dwarf_Ptr ptr, Dwarf_Unsigned type);
dwarf_fde_cie_list_dealloc(Dwarf_Debug dbg, Dwarf_Cie *cie_list,
Dwarf_Signed cie_count, Dwarf_Fde *fde_list,
Dwarf_Signed fde_count);
void
dwarf_funcs_dealloc(Dwarf_Debug dbg, Dwarf_Func *funcs,
Dwarf_Signed funccount);
void
dwarf_globals_dealloc(Dwarf_Debug dbg, Dwarf_Global *globals,
Dwarf_Signed globalcount);
void
dwarf_pubtypes_dealloc(Dwarf_Debug dbg, Dwarf_Type *pubtypes,
Dwarf_Signed pubtypecount);
void
dwarf_ranges_dealloc(Dwarf_Debug dbg, Dwarf_Ranges *ranges,
Dwarf_Signed rangecount);
void
dwarf_srclines_dealloc(Dwarf_Debug dbg, Dwarf_Line *lines,
Dwarf_Signed linecount);
void
dwarf_types_dealloc(Dwarf_Debug dbg, Dwarf_Type *types,
Dwarf_Signed typecount);
void
dwarf_vars_dealloc(Dwarf_Debug dbg, Dwarf_Var *vars,
Dwarf_Signed varcount);
void
dwarf_weaks_dealloc(Dwarf_Debug dbg, Dwarf_Weak *weaks,
Dwarf_Signed weakcount);
π§ DESCRIPTION π§
The function dwarf_dealloc() is how applications say βhey bestie, this memory area returned by the DWARF Access Library (libdwarf, -ldwarf) can be safely disposed off nowβ π
Due to the way memory is managed in the current implementation, using dwarf_dealloc() is only necessary for a small set of DWARF types. No cap.
Argument dbg should reference a valid debugging context allocated using dwarf_init(3) β¨
Argument ptr should point to an object or memory area obtained by a prior call to a DWARF(3) function.
Argument type indicates the type of object being deallocated. The indicated type must match that of the object being passed in argument ptr β like, matching energy is mandatory, bestie. Valid values for the type argument are:
DW_DLA_ABBREVβ an object of typeDwarf_Abbrev, as returned by a call to the functiondwarf_get_abbrev(3).DW_DLA_DIEβ an object of typeDwarf_Die, as returned by calls to the functionsdwarf_child(3),dwarf_offdie(3)ordwarf_siblingof(3).DW_DLA_FRAME_BLOCKβ an array of objects of typeDwarf_Frame_op, as returned by a call to the functiondwarf_expand_frame_instructions(3).
Calls to dwarf_dealloc() with other values for argument type are no-ops in this implementation π«
The functions dwarf_fde_cie_list_dealloc(), dwarf_funcs_dealloc(), dwarf_globals_dealloc(), dwarf_pubtypes_dealloc(), dwarf_ranges_dealloc(), dwarf_srclines_dealloc(), dwarf_types_dealloc(), dwarf_vars_dealloc() and dwarf_weaks_dealloc() are provided for compatibility with other implementations of the DWARF(3) API. Due to the way memory is managed in the current implementation, these functions are effectively no-ops. Iconic compatibility behavior, honestly.
See dwarf(3) for more information about the memory management scheme in this implementation of the DWARF(3) API πΈ
π RETURN VALUES π
Functions dwarf_dealloc(), dwarf_fde_cie_list_dealloc(), dwarf_funcs_dealloc(), dwarf_globals_dealloc(), dwarf_pubtypes_dealloc(), dwarf_ranges_dealloc(), dwarf_srclines_dealloc(), dwarf_types_dealloc(), dwarf_vars_dealloc() and dwarf_weaks_dealloc() have no return value. None. Zero. Void energy π
π¦ SEE ALSO π¦
dwarf(3)dwarf_child(3)dwarf_expand_frame_instructions(3)dwarf_get_abbrev(3)dwarf_offdie(3)dwarf_siblingof(3)
mwah π and thatβs the footer tea: this page comes from Debian, dated July 23, 2011, and the manual page is DWARF_DEALLOC(3) πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: libdwarf 15.0.0
- Copyright (c) 2009-2011 Joseph Koshy. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms