代码搜索:malloc
找到约 10,000 项符合「malloc」的源代码
代码结果 10,000
www.eeworm.com/read/397514/8041427
cpp 主存空间的分配与回收.cpp
#include "stdio.h"
#include
#include
#include
#include "iostream.h"
#define getjcb(type) (type*)malloc(sizeof(type))
#define getsub(type) (type*)malloc(sizeof(t
www.eeworm.com/read/324781/13245375
c fb.c
#include "fb.h"
int fb_init()
{
static int fb_inited = 0;
char *dev, *env;
if (fb_inited)
return 0;
fb = malloc(sizeof(FRAMEBUFFER));
if (!fb) {
fprintf(stderr, "malloc: %s\n", strerror(er
www.eeworm.com/read/128447/5990672
changelog
1999-04-23 Hugo Tyson
* tests/testcx7.cxx: T2_MALLOC definition; only make it smaller
than the main consumer malloc if coaleasing is enabled, otherwise
the mempool cannot allo
www.eeworm.com/read/100285/6271820
c type.c
#include
#include
#include
#include "extern.h"
/* malloc + error check */
void *
mm_alloc(size_t size)
{
void *ptr = malloc(size);
if (ptr == NULL)
{
fprintf
www.eeworm.com/read/236246/4643018
cpp 8_9.cpp
//8_9
#include
#include
void main()
{
void* p = malloc(1000000);
int i=1;
while(p){
p = malloc(1000000);
i++;
}
cout
www.eeworm.com/read/233522/4667352
cxx test_matrix_fixed.cxx
// This is core/vnl/tests/test_matrix_fixed.cxx
#if TEST_MALLOC // see note below, at the other #if TEST_MALLOC
#include
#endif
#include // do not use iostream within op
www.eeworm.com/read/233448/4692426
c fail8-frag.c
#include
#include
#include
int main ()
{
char *foo;
char *bar;
foo = (char *)malloc (10);
bar = (char *)malloc (10);
free(bar);
memcpy(foo, bar, 10);
return 0;
}
/* {
www.eeworm.com/read/233448/4692435
c pass6-frag.c
#include
#include
#include
int main ()
{
char *foo;
char *bar;
foo = (char *)malloc (10);
bar = (char *)malloc (10);
bar[2] = 'z'; /* touch memcpy source */
memcpy(foo
www.eeworm.com/read/233448/4692472
c fail25-frag.c
#include
#include
#include
int main ()
{
char *foo;
char *bar;
__mf_set_options ("-check-initialization");
foo = (char *)malloc (10);
bar = (char *)malloc (10);
/* bar[
www.eeworm.com/read/209211/4981484
c compat.c
#include "l.h"
/*
* fake malloc
*/
void*
malloc(ulong n)
{
void *p;
while(n & 7)
n++;
while(nhunk < n)
gethunk();
p = hunk;
nhunk -= n;
hunk += n;
return p;
}
void
free(void *p)
{
USE