⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 epocmemory.cpp

📁 大名鼎鼎的远程登录软件putty的Symbian版源码
💻 CPP
字号:
/*    epocmemory.cpp * * Symbian OS memory management routines for PuTTY * * Copyright 2002 Petteri Kangaslampi * * See license.txt for full copyright and license information.*/#include <e32std.h>#include <e32svr.h>#include <string.h>#include <stdlib.h>extern "C" {#include "putty.h"#include "assert.h"}void epoc_memory_init() {}void epoc_memory_free() {}void *safemalloc(size_t size){    void *p;    p = User::Alloc((TInt)size);    if ( !p ) {        fatalbox("Out of memory");        exit(1);    }    return p;}void *saferealloc(void *ptr, size_t size){    void *p;        if (!ptr) {	p = User::Alloc((TInt)size);    } else {        p = User::ReAlloc(ptr, (TInt) size);    }        if (!p) {        fatalbox("Out of memory");        exit(1);    }    return p;}void safefree(void *ptr){    if ( ptr ) {        User::Free(ptr);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -