[{"data":1,"prerenderedAt":546},["ShallowReactive",2],{"Ad4fkxisQk":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":545,"_id":4},"VkAllocationCallbacks","Structure containing callback function pointers for memory allocation","VK_VERSION_1_0","structs",[],{"type":10,"children":11,"toc":543},"root",[12,28,305,428,537],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17,20,26],{"type":18,"value":19},"text","Allocators are provided by the application as a pointer to a\n",{"type":13,"tag":21,"props":22,"children":24},"code",{"className":23},[],[25],{"type":18,"value":4},{"type":18,"value":27}," structure:",{"type":13,"tag":29,"props":30,"children":31},"code-group",{},[32,135],{"type":13,"tag":33,"props":34,"children":40},"pre",{"className":35,"code":36,"filename":37,"language":38,"meta":39,"style":39},"language-c shiki shiki-themes github-light-default github-dark-default","typedef struct VkAllocationCallbacks {\n void* pUserData;\n PFN_vkAllocationFunction pfnAllocation;\n PFN_vkReallocationFunction pfnReallocation;\n PFN_vkFreeFunction pfnFree;\n PFN_vkInternalAllocationNotification pfnInternalAllocation;\n PFN_vkInternalFreeNotification pfnInternalFree;\n} VkAllocationCallbacks;\n","C","c","",[41],{"type":13,"tag":21,"props":42,"children":43},{"__ignoreMap":39},[44,67,81,90,99,108,117,126],{"type":13,"tag":45,"props":46,"children":49},"span",{"class":47,"line":48},"line",1,[50,56,61],{"type":13,"tag":45,"props":51,"children":53},{"style":52},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[54],{"type":18,"value":55},"typedef",{"type":13,"tag":45,"props":57,"children":58},{"style":52},[59],{"type":18,"value":60}," struct",{"type":13,"tag":45,"props":62,"children":64},{"style":63},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[65],{"type":18,"value":66}," VkAllocationCallbacks {\n",{"type":13,"tag":45,"props":68,"children":70},{"class":47,"line":69},2,[71,76],{"type":13,"tag":45,"props":72,"children":73},{"style":52},[74],{"type":18,"value":75}," void*",{"type":13,"tag":45,"props":77,"children":78},{"style":63},[79],{"type":18,"value":80}," pUserData;\n",{"type":13,"tag":45,"props":82,"children":84},{"class":47,"line":83},3,[85],{"type":13,"tag":45,"props":86,"children":87},{"style":63},[88],{"type":18,"value":89}," PFN_vkAllocationFunction pfnAllocation;\n",{"type":13,"tag":45,"props":91,"children":93},{"class":47,"line":92},4,[94],{"type":13,"tag":45,"props":95,"children":96},{"style":63},[97],{"type":18,"value":98}," PFN_vkReallocationFunction pfnReallocation;\n",{"type":13,"tag":45,"props":100,"children":102},{"class":47,"line":101},5,[103],{"type":13,"tag":45,"props":104,"children":105},{"style":63},[106],{"type":18,"value":107}," PFN_vkFreeFunction pfnFree;\n",{"type":13,"tag":45,"props":109,"children":111},{"class":47,"line":110},6,[112],{"type":13,"tag":45,"props":113,"children":114},{"style":63},[115],{"type":18,"value":116}," PFN_vkInternalAllocationNotification pfnInternalAllocation;\n",{"type":13,"tag":45,"props":118,"children":120},{"class":47,"line":119},7,[121],{"type":13,"tag":45,"props":122,"children":123},{"style":63},[124],{"type":18,"value":125}," PFN_vkInternalFreeNotification pfnInternalFree;\n",{"type":13,"tag":45,"props":127,"children":129},{"class":47,"line":128},8,[130],{"type":13,"tag":45,"props":131,"children":132},{"style":63},[133],{"type":18,"value":134},"} VkAllocationCallbacks;\n",{"type":13,"tag":33,"props":136,"children":141},{"className":137,"code":138,"filename":139,"language":140,"meta":39,"style":39},"language-rs shiki shiki-themes github-light-default github-dark-default","pub struct AllocationCallbacks {\n p_user_data: *mut c_void,\n pfn_allocation: PFN_vkAllocationFunction,\n pfn_reallocation: PFN_vkReallocationFunction,\n pfn_free: PFN_vkFreeFunction,\n pfn_internal_allocation: PFN_vkInternalAllocationNotification,\n pfn_internal_free: PFN_vkInternalFreeNotification,\n}\n","Rust","rs",[142],{"type":13,"tag":21,"props":143,"children":144},{"__ignoreMap":39},[145,168,191,213,234,255,276,297],{"type":13,"tag":45,"props":146,"children":147},{"class":47,"line":48},[148,153,157,163],{"type":13,"tag":45,"props":149,"children":150},{"style":52},[151],{"type":18,"value":152},"pub",{"type":13,"tag":45,"props":154,"children":155},{"style":52},[156],{"type":18,"value":60},{"type":13,"tag":45,"props":158,"children":160},{"style":159},"--shiki-default:#953800;--shiki-dark:#FFA657",[161],{"type":18,"value":162}," AllocationCallbacks",{"type":13,"tag":45,"props":164,"children":165},{"style":63},[166],{"type":18,"value":167}," {\n",{"type":13,"tag":45,"props":169,"children":170},{"class":47,"line":69},[171,176,181,186],{"type":13,"tag":45,"props":172,"children":173},{"style":63},[174],{"type":18,"value":175}," p_user_data",{"type":13,"tag":45,"props":177,"children":178},{"style":52},[179],{"type":18,"value":180},":",{"type":13,"tag":45,"props":182,"children":183},{"style":52},[184],{"type":18,"value":185}," *mut",{"type":13,"tag":45,"props":187,"children":188},{"style":63},[189],{"type":18,"value":190}," c_void,\n",{"type":13,"tag":45,"props":192,"children":193},{"class":47,"line":83},[194,199,203,208],{"type":13,"tag":45,"props":195,"children":196},{"style":63},[197],{"type":18,"value":198}," pfn_allocation",{"type":13,"tag":45,"props":200,"children":201},{"style":52},[202],{"type":18,"value":180},{"type":13,"tag":45,"props":204,"children":205},{"style":159},[206],{"type":18,"value":207}," PFN_vkAllocationFunction",{"type":13,"tag":45,"props":209,"children":210},{"style":63},[211],{"type":18,"value":212},",\n",{"type":13,"tag":45,"props":214,"children":215},{"class":47,"line":92},[216,221,225,230],{"type":13,"tag":45,"props":217,"children":218},{"style":63},[219],{"type":18,"value":220}," pfn_reallocation",{"type":13,"tag":45,"props":222,"children":223},{"style":52},[224],{"type":18,"value":180},{"type":13,"tag":45,"props":226,"children":227},{"style":159},[228],{"type":18,"value":229}," PFN_vkReallocationFunction",{"type":13,"tag":45,"props":231,"children":232},{"style":63},[233],{"type":18,"value":212},{"type":13,"tag":45,"props":235,"children":236},{"class":47,"line":101},[237,242,246,251],{"type":13,"tag":45,"props":238,"children":239},{"style":63},[240],{"type":18,"value":241}," pfn_free",{"type":13,"tag":45,"props":243,"children":244},{"style":52},[245],{"type":18,"value":180},{"type":13,"tag":45,"props":247,"children":248},{"style":159},[249],{"type":18,"value":250}," PFN_vkFreeFunction",{"type":13,"tag":45,"props":252,"children":253},{"style":63},[254],{"type":18,"value":212},{"type":13,"tag":45,"props":256,"children":257},{"class":47,"line":110},[258,263,267,272],{"type":13,"tag":45,"props":259,"children":260},{"style":63},[261],{"type":18,"value":262}," pfn_internal_allocation",{"type":13,"tag":45,"props":264,"children":265},{"style":52},[266],{"type":18,"value":180},{"type":13,"tag":45,"props":268,"children":269},{"style":159},[270],{"type":18,"value":271}," PFN_vkInternalAllocationNotification",{"type":13,"tag":45,"props":273,"children":274},{"style":63},[275],{"type":18,"value":212},{"type":13,"tag":45,"props":277,"children":278},{"class":47,"line":119},[279,284,288,293],{"type":13,"tag":45,"props":280,"children":281},{"style":63},[282],{"type":18,"value":283}," pfn_internal_free",{"type":13,"tag":45,"props":285,"children":286},{"style":52},[287],{"type":18,"value":180},{"type":13,"tag":45,"props":289,"children":290},{"style":159},[291],{"type":18,"value":292}," PFN_vkInternalFreeNotification",{"type":13,"tag":45,"props":294,"children":295},{"style":63},[296],{"type":18,"value":212},{"type":13,"tag":45,"props":298,"children":299},{"class":47,"line":128},[300],{"type":13,"tag":45,"props":301,"children":302},{"style":63},[303],{"type":18,"value":304},"}\n",{"type":13,"tag":306,"props":307,"children":308},"ul",{},[309,335,355,373,391,410],{"type":13,"tag":310,"props":311,"children":312},"li",{},[313,319,321,326,328,333],{"type":13,"tag":21,"props":314,"children":316},{"className":315},[],[317],{"type":18,"value":318},"pUserData",{"type":18,"value":320}," is a value to be interpreted by the implementation of\nthe callbacks.\nWhen any of the callbacks in ",{"type":13,"tag":21,"props":322,"children":324},{"className":323},[],[325],{"type":18,"value":4},{"type":18,"value":327}," are called, the\nVulkan implementation will pass this value as the first parameter to the\ncallback.\nThis value ",{"type":13,"tag":329,"props":330,"children":332},"normative",{"type":331},"can",[],{"type":18,"value":334}," vary each time an allocator is passed into a command,\neven when the same object takes an allocator in multiple commands.",{"type":13,"tag":310,"props":336,"children":337},{},[338,344,346,353],{"type":13,"tag":21,"props":339,"children":341},{"className":340},[],[342],{"type":18,"value":343},"pfnAllocation",{"type":18,"value":345}," is a ",{"type":13,"tag":347,"props":348,"children":350},"a",{"href":349},"/man/PFN_vkAllocationFunction",[351],{"type":18,"value":352},"PFN_vkAllocationFunction",{"type":18,"value":354}," pointer to an\napplication-defined memory allocation function.",{"type":13,"tag":310,"props":356,"children":357},{},[358,364,365,371],{"type":13,"tag":21,"props":359,"children":361},{"className":360},[],[362],{"type":18,"value":363},"pfnReallocation",{"type":18,"value":345},{"type":13,"tag":347,"props":366,"children":368},{"href":367},"/man/PFN_vkReallocationFunction",[369],{"type":18,"value":370},"PFN_vkReallocationFunction",{"type":18,"value":372}," pointer to\nan application-defined memory reallocation function.",{"type":13,"tag":310,"props":374,"children":375},{},[376,382,383,389],{"type":13,"tag":21,"props":377,"children":379},{"className":378},[],[380],{"type":18,"value":381},"pfnFree",{"type":18,"value":345},{"type":13,"tag":347,"props":384,"children":386},{"href":385},"/man/PFN_vkFreeFunction",[387],{"type":18,"value":388},"PFN_vkFreeFunction",{"type":18,"value":390}," pointer to an\napplication-defined memory free function.",{"type":13,"tag":310,"props":392,"children":393},{},[394,400,402,408],{"type":13,"tag":21,"props":395,"children":397},{"className":396},[],[398],{"type":18,"value":399},"pfnInternalAllocation",{"type":18,"value":401}," is a\n",{"type":13,"tag":347,"props":403,"children":405},{"href":404},"/man/PFN_vkInternalAllocationNotification",[406],{"type":18,"value":407},"PFN_vkInternalAllocationNotification",{"type":18,"value":409}," pointer to an\napplication-defined function that is called by the implementation when\nthe implementation makes internal allocations.",{"type":13,"tag":310,"props":411,"children":412},{},[413,419,420,426],{"type":13,"tag":21,"props":414,"children":416},{"className":415},[],[417],{"type":18,"value":418},"pfnInternalFree",{"type":18,"value":345},{"type":13,"tag":347,"props":421,"children":423},{"href":422},"/man/PFN_vkInternalFreeNotification",[424],{"type":18,"value":425},"PFN_vkInternalFreeNotification",{"type":18,"value":427}," pointer\nto an application-defined function that is called by the implementation\nwhen the implementation frees internal allocations.",{"type":13,"tag":429,"props":430,"children":432},"validity-group",{"name":431},"Valid Usage",[433,458,479,501],{"type":13,"tag":434,"props":435,"children":437},"validity-field",{"name":436},"VUID-VkAllocationCallbacks-pfnAllocation-00632",[438],{"type":13,"tag":14,"props":439,"children":440},{},[441,446,448,452,454],{"type":13,"tag":21,"props":442,"children":444},{"className":443},[],[445],{"type":18,"value":343},{"type":18,"value":447}," ",{"type":13,"tag":329,"props":449,"children":451},{"type":450},"must",[],{"type":18,"value":453}," be a valid pointer to a valid\napplication-defined ",{"type":13,"tag":347,"props":455,"children":456},{"href":349},[457],{"type":18,"value":352},{"type":13,"tag":434,"props":459,"children":461},{"name":460},"VUID-VkAllocationCallbacks-pfnReallocation-00633",[462],{"type":13,"tag":14,"props":463,"children":464},{},[465,470,471,474,475],{"type":13,"tag":21,"props":466,"children":468},{"className":467},[],[469],{"type":18,"value":363},{"type":18,"value":447},{"type":13,"tag":329,"props":472,"children":473},{"type":450},[],{"type":18,"value":453},{"type":13,"tag":347,"props":476,"children":477},{"href":367},[478],{"type":18,"value":370},{"type":13,"tag":434,"props":480,"children":482},{"name":481},"VUID-VkAllocationCallbacks-pfnFree-00634",[483],{"type":13,"tag":14,"props":484,"children":485},{},[486,491,492,495,497],{"type":13,"tag":21,"props":487,"children":489},{"className":488},[],[490],{"type":18,"value":381},{"type":18,"value":447},{"type":13,"tag":329,"props":493,"children":494},{"type":450},[],{"type":18,"value":496}," be a valid pointer to a valid application-defined\n",{"type":13,"tag":347,"props":498,"children":499},{"href":385},[500],{"type":18,"value":388},{"type":13,"tag":434,"props":502,"children":504},{"name":503},"VUID-VkAllocationCallbacks-pfnInternalAllocation-00635",[505],{"type":13,"tag":14,"props":506,"children":507},{},[508,510,515,517,522,524,530,532,535],{"type":18,"value":509},"If either of ",{"type":13,"tag":21,"props":511,"children":513},{"className":512},[],[514],{"type":18,"value":399},{"type":18,"value":516}," or ",{"type":13,"tag":21,"props":518,"children":520},{"className":519},[],[521],{"type":18,"value":418},{"type":18,"value":523}," is not\n",{"type":13,"tag":21,"props":525,"children":527},{"className":526},[],[528],{"type":18,"value":529},"NULL",{"type":18,"value":531},", both ",{"type":13,"tag":329,"props":533,"children":534},{"type":450},[],{"type":18,"value":536}," be valid callbacks",{"type":13,"tag":538,"props":539,"children":540},"style",{},[541],{"type":18,"value":542},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":39,"searchDepth":69,"depth":69,"links":544},[],"markdown",1725732538584]