本文整理汇总了C++中dealloc函数的典型用法代码示例。如果您正苦于以下问题:C++ dealloc函数的具体用法?C++ dealloc怎么用?C++ dealloc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dealloc函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: elim_var
// callback to replace variable at index 'idx' with definition 'def' and updated formula 'fml'
virtual void elim_var(unsigned idx, expr* fml, expr* def) {
m_fml = fml;
m_pos.reset();
m_neg.reset();
get_nnf(m_fml, get_is_relevant(), get_mk_atom(), m_pos, m_neg);
m_vars.erase(idx);
dealloc(m_contains_app[idx]);
m_contains_app.erase(m_contains_app.c_ptr() + idx);
}
开发者ID:CHolmes3,项目名称:z3,代码行数:10,代码来源:qe_sat_tactic.cpp
示例2: _l
status_t SimpleBestFitAllocator::deallocate(size_t offset)
{
Mutex::Autolock _l(mLock);
chunk_t const * const freed = dealloc(offset);
if (freed) {
return NO_ERROR;
}
return NAME_NOT_FOUND;
}
开发者ID:Bmetz,项目名称:platform_frameworks_base,代码行数:9,代码来源:MemoryDealer.cpp
示例3: fdclose
int
fdclose(struct open_file *f)
{
struct fd_softc *sc = f->f_devdata;
IOCS_B_DRVCHK((0x90 + sc->unit) << 8, 3);
dealloc(sc, sizeof(struct fd_softc));
return 0;
}
开发者ID:lacombar,项目名称:netbsd-alc,代码行数:9,代码来源:fd.c
示例4: dealloc
void model_evaluator_util::reset(model* model) {
if (m_mev) {
dealloc(m_mev);
m_mev = NULL;
}
m_model = model;
if (!m_model) { return; }
m_mev = alloc(model_evaluator, *m_model);
}
开发者ID:greatmazinger,项目名称:z3,代码行数:9,代码来源:spacer_util.cpp
示例5: dealloc
~join_planner()
{
cost_map::iterator it = m_costs.begin();
cost_map::iterator end = m_costs.end();
for (; it != end; ++it) {
dealloc(it->m_value);
}
m_costs.reset();
}
开发者ID:CHolmes3,项目名称:z3,代码行数:9,代码来源:dl_mk_simple_joins.cpp
示例6: munmap
/*===========================================================================
* FUNCTION : deallocate
*
* DESCRIPTION: deallocate buffers
*
* PARAMETERS : none
*
* RETURN : none
*==========================================================================*/
void QCamera3HeapMemory::deallocate()
{
for (int i = 0; i < mBufferCount; i++) {
munmap(mPtr[i], mMemInfo[i].size);
mPtr[i] = NULL;
}
dealloc();
mBufferCount = 0;
}
开发者ID:HB72K1,项目名称:G620S-CM11,代码行数:18,代码来源:QCamera3Mem.cpp
示例7: dealloc
model::~model() {
sort2universe::iterator it3 = m_usort2universe.begin();
sort2universe::iterator end3 = m_usort2universe.end();
for (; it3 != end3; ++it3) {
m_manager.dec_ref(it3->m_key);
m_manager.dec_array_ref(it3->m_value->size(), it3->m_value->c_ptr());
dealloc(it3->m_value);
}
}
开发者ID:EinNarr,项目名称:z3,代码行数:9,代码来源:model.cpp
示例8: ext2fs_close
__compactcall int
ext2fs_close(struct open_file *f)
{
struct file *fp = (struct file *)f->f_fsdata;
f->f_fsdata = NULL;
if (fp == NULL)
return 0;
if (fp->f_fs->e2fs_gd)
dealloc(fp->f_fs->e2fs_gd,
sizeof(struct ext2_gd) * fp->f_fs->e2fs_ncg);
if (fp->f_buf)
dealloc(fp->f_buf, fp->f_fs->e2fs_bsize);
dealloc(fp->f_fs, sizeof(*fp->f_fs));
dealloc(fp, sizeof(struct file));
return 0;
}
开发者ID:RyanLucchese,项目名称:rumpkernel-netbsd-src,代码行数:18,代码来源:ext2fs.c
示例9: dec_ref
void func_decl_dependencies::erase(func_decl * f) {
func_decl_set * s = 0;
if (m_deps.find(f, s)) {
m_manager.dec_ref(f);
dec_ref(m_manager, *s);
m_deps.erase(f);
dealloc(s);
}
}
开发者ID:annachen368,项目名称:HadoopStreamingTester,代码行数:9,代码来源:func_decl_dependencies.cpp
示例10: dealloc
void grobner::del_monomial(monomial * m) {
ptr_vector<expr>::iterator it2 = m->m_vars.begin();
ptr_vector<expr>::iterator end2 = m->m_vars.end();
for (; it2 != end2; ++it2) {
expr * v = *it2;
m_manager.dec_ref(v);
}
dealloc(m);
}
开发者ID:0Chuzz,项目名称:z3,代码行数:9,代码来源:grobner.cpp
示例11: reset
virtual void reset() {
if (m_context != 0) {
#pragma omp critical (solver)
{
dealloc(m_context);
m_context = 0;
}
}
}
开发者ID:Moondee,项目名称:Artemis,代码行数:9,代码来源:solver.cpp
示例12: dealloc
/*===========================================================================
* FUNCTION : deallocate
*
* DESCRIPTION: deallocate buffers
*
* PARAMETERS : none
*
* RETURN : none
*==========================================================================*/
void QCameraStreamMemory::deallocate()
{
for (int i = 0; i < mBufferCount; i ++) {
mCameraMemory[i]->release(mCameraMemory[i]);
mCameraMemory[i] = NULL;
}
dealloc();
mBufferCount = 0;
}
开发者ID:10114395,项目名称:android-5.0.0_r5,代码行数:18,代码来源:QCameraMem.cpp
示例13: free_opts
void free_opts(struct opts* opt) {
while(opt) {
void* tmp=opt->next;
if(opt->value) {
dealloc((void*)opt->value);
opt->value=NULL;
}
if(opt->name) {
dealloc((void*)opt->name);
opt->name=NULL;
}
opt->next=NULL;
tmp=opt;
opt=opt->next;
dealloc(tmp);
}
}
开发者ID:neuroradiology,项目名称:roswell,代码行数:18,代码来源:opt.c
示例14: dvma_free
void
dvma_free(char *dvma, int len)
{
char *mem;
mem = dvma_mapout(dvma, len);
if (mem != NULL)
dealloc(mem, len);
}
开发者ID:lacombar,项目名称:netbsd-alc,代码行数:9,代码来源:dvma.c
示例15: main
int main(int argc, char *argv[])
{
if (argc != 5){
printf("usage: ex29 english_words foreign_words replace_text out_file\n");
exit(1);
}
char *foreign[DICT_SIZE], *english[DICT_SIZE], *words[MAX_IN];
int i, words_len;
FILE *fp = fopen(argv[3], "r");
char tmp[MAX_IN];
fgets(tmp, MAX_IN, fp);
fclose(fp);
words_len = str_spc_split(tmp, words);
read_file(argv[1], english, DICT_SIZE);
read_file(argv[2], foreign, DICT_SIZE);
fp = fopen(argv[4], "w");
int wloc;
for (i = 0; i < words_len; ++i){
if ((wloc = contains(english, words[i], DICT_SIZE))){
fputs(foreign[wloc - 1], fp);
fputc(' ', fp);
} else {
fputs(words[i], fp);
fputc(' ', fp);
}
}
fclose(fp);
dealloc(english, DICT_SIZE);
dealloc(foreign, DICT_SIZE);
dealloc(words, words_len);
return 0;
}
开发者ID:heuristicus,项目名称:a-book-on-c,代码行数:44,代码来源:ex29.c
示例16: get_attr
void DieHolder::get_frame_base_offsets(OffsetAreas &offset_areas)
{
Dwarf_Attribute attrib = get_attr(DW_AT_frame_base);
Dwarf_Locdesc **llbuf = NULL;
Dwarf_Locdesc *locdesc = NULL;
Dwarf_Signed count = 0;
Dwarf_Error err = NULL;
DwarfDealloc dealloc(m_dbg);
CHECK_DWERR2(attrib == NULL, NULL,
"retrieving an operand implies finding the attribute...");
CHECK_DWERR(dwarf_loclist_n(attrib, &llbuf, &count, &err), err,
"cannot get location descriptions");
dealloc.add(llbuf, DW_DLA_LIST);
for(Dwarf_Signed idx = 0; idx < count; ++idx)
{
ea_t low_pc = 0;
ea_t high_pc = 0;
locdesc = llbuf[idx];
// handle deallocation too
dealloc.add(llbuf[idx], DW_DLA_LOCDESC);
dealloc.add(llbuf[idx]->ld_s, DW_DLA_LOC_BLOCK);
// only 1 location in a location description is supported
if(locdesc->ld_cents == 1)
{
Dwarf_Loc *loc = &locdesc->ld_s[0];
Dwarf_Small const atom = loc->lr_atom;
// from a location block?
if(!locdesc->ld_from_loclist)
{
low_pc = BADADDR;
high_pc = BADADDR;
}
// this loc desc is from a location list
else
{
low_pc = static_cast<ea_t>(locdesc->ld_lopc);
high_pc = static_cast<ea_t>(locdesc->ld_hipc);
}
// is it the right atom to get the offset from?
if(atom == DW_OP_breg4 || atom == DW_OP_breg5)
{
offset_areas.push_back(OffsetArea(low_pc, high_pc,
// operand is unsigned, but should be signed...
static_cast<sval_t>(loc->lr_number),
(atom == DW_OP_breg5)));
}
}
}
}
开发者ID:IDA-RE-things,项目名称:idadwarf,代码行数:56,代码来源:die_utils.cpp
示例17: dealloc
context::~context() {
m_last_obj = 0;
if (!m_user_ref_count) {
for (unsigned i = 0; i < m_replay_stack.size(); ++i) {
dealloc(m_replay_stack[i]);
}
m_ast_trail.reset();
}
reset_parser();
}
开发者ID:RickyUlrich,项目名称:z3,代码行数:10,代码来源:api_context.cpp
示例18: switch
void params::del_value(entry & e) {
switch (e.second.m_kind) {
case CPK_NUMERAL:
if (e.second.m_kind == CPK_NUMERAL)
dealloc(e.second.m_rat_value);
break;
default:
return;
}
}
开发者ID:greatmazinger,项目名称:z3,代码行数:10,代码来源:params.cpp
示例19: dealloc
bool func_decl_dependencies::insert(func_decl * f, func_decl_set * s) {
if (m_deps.contains(f)) {
dealloc(s);
return false;
}
m_deps.insert(f, s);
top_sort cycle_detector(m_manager, m_deps);
if (cycle_detector(f)) {
m_deps.erase(f);
dealloc(s);
return false;
}
m_manager.inc_ref(f);
inc_ref(m_manager, *s);
return true;
}
开发者ID:annachen368,项目名称:HadoopStreamingTester,代码行数:19,代码来源:func_decl_dependencies.cpp
示例20: finalize_inf_rational
void rational::finalize() {
finalize_inf_rational();
finalize_inf_int_rational();
m_powers_of_two.finalize();
m_zero.~rational();
m_one.~rational();
m_minus_one.~rational();
dealloc(g_mpq_manager);
g_mpq_manager = nullptr;
}
开发者ID:NikolajBjorner,项目名称:z3,代码行数:10,代码来源:rational.cpp
注:本文中的dealloc函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论