pro_alloc.c revision 49d3bc91e27cd871b950d56c01398fa2f2e12ab4
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy/*
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy This program is free software; you can redistribute it and/or modify it
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy under the terms of version 2.1 of the GNU Lesser General Public License
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy as published by the Free Software Foundation.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy This program is distributed in the hope that it would be useful, but
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy WITHOUT ANY WARRANTY; without even the implied warranty of
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Further, this software is distributed without any warranty that it is
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy free of the rightful claim of any third person regarding infringement
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy or the like. Any license provided herein, whether implied or
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy otherwise, applies only to this software file. Patent licenses, if
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy any, provided herein do not apply to combinations of this program with
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy other software, or any other product whatsoever.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy You should have received a copy of the GNU Lesser General Public
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy License along with this program; if not, write the Free Software
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307,
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy USA.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky,
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Mountain View, CA 94043, or:
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy http://www.sgi.com
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy For further information regarding this notice, see:
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy http://oss.sgi.com/projects/GenInfo/NoticeExplan
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy*/
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy#include "config.h"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy#include "dwarf_incl.h"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy#include <stdlib.h>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy/*
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy The allocator wants to know which region
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy this is to be in so it can allocate the new space
with respect to the right region.
*/
/*ARGSUSED*/
Dwarf_Ptr _dwarf_p_get_alloc(Dwarf_P_Debug dbg, Dwarf_Unsigned size)
{
void *sp;
sp = malloc(size);
memset(sp,0, (int) size);
return sp;
}
/*ARGSUSED*/ void
dwarf_p_dealloc(void *space, Dwarf_Unsigned typ)
{
free(space);
return;
}
/* Essentially a stub for now. */
/*ARGSUSED*/ void
_dwarf_p_dealloc(Dwarf_P_Debug dbg, Dwarf_Small * ptr)
{
dwarf_p_dealloc(ptr, DW_DLA_STRING);
}