代码搜索:malloc
找到约 10,000 项符合「malloc」的源代码
代码结果 10,000
www.eeworm.com/read/102552/15777979
htm subject_19936.htm
序号:19936 发表者:booky 发表日期:2002-11-01 13:47:19
主题:关于DLL的奇怪问题
内容:我在DLL里面用<mark>malloc</mark>申请了一块内存,但在调用该DLL的进程中用free释放它,结果会出错。DLL用的是调用它的进程的数据段和堆栈段,那么为什么不能释放呢?如果要达到以上的效果,应该用什么API呢?////////////////// ...
www.eeworm.com/read/100237/15879804
c memory.c
/*
* (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
* You may copy, distribute, and use this software as long as this
* copyright statement is not removed.
*/
#ifndef lint
static
c
www.eeworm.com/read/100073/15886557
cf hp.cf
XCOMM platform: $XConsortium: hp.cf,v 1.48 91/12/18 09:43:08 rws Exp $
#define OSName HP-UX 7.0
XCOMM operating system: OSName
#define OSMajorVersion 7
#define OSMinorVersio
www.eeworm.com/read/291506/8412231
cpp main.cpp
#include
#include
#include
#include
#include
#include "ace/MMAP_Memory_Pool.h"
#include "ace/Process_Mutex.h"
#
www.eeworm.com/read/189512/8466599
c lib.c
/* Copyright (c) 1994 Sun Wu, Udi Manber, Burra Gopal. All Rights Reserved. */
/* ./glimpse/index/lib.c */
#include
unsigned char *strdup(str)
unsigned char *str;
{
int len;
unsigned cha
www.eeworm.com/read/189298/8477404
c a_client.c
/*
** A program that uses the less error-prone memory allocator.
*/
#include "alloc.h"
void
function()
{
int *new_memory;
/*
** Get space for a bunch of integers
*/
new_memory = MA
www.eeworm.com/read/390183/8480121
c rdfload.c
/* rdfload.c RDOFF Object File loader library
*
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and
* Julian Hall. All rights reserved. The software is
* redistributable under the l
www.eeworm.com/read/390183/8480403
c nasmlib.c
/* nasmlib.c library routines for the Netwide Assembler
*
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and
* Julian Hall. All rights reserved. The software is
* redistributable u
www.eeworm.com/read/189196/8485082
txt 二维数组开内存以及开内存空间(不用new和delete).txt
#define MALLOC_LINTOK(ptr, nelem, type) \
(ptr = (type *) malloc((size_t) ((nelem) * sizeof(type))))
使用时:
(void) MALLOC_LINTOK(aNew, n, TYPE_ARRAY);
for (i = 0; i < n; i++)
aNew[i] = 0.0
www.eeworm.com/read/290380/8486496
c fillheap.c
#include
#include
void main(void)
{
char *buffer1, *buffer2, *buffer3;
int i, state;
buffer1 = malloc(100);
buffer2 = malloc(200);
buffer3 = malloc(300)