您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetMemory函数代码示例

51自学网 2021-06-01 21:10:40
  C++
这篇教程C++ GetMemory函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetMemory函数的典型用法代码示例。如果您正苦于以下问题:C++ GetMemory函数的具体用法?C++ GetMemory怎么用?C++ GetMemory使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetMemory函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: sizeof

FILE* ON_Workspace::OpenFile( const wchar_t* sFileName, const wchar_t* sMode ) {  FILE* pFile = ON::OpenFile( sFileName, sMode );  if ( pFile )   {    struct ON_Workspace_FBLK* pFileBlk = (struct ON_Workspace_FBLK*)GetMemory( sizeof(*pFileBlk) );    pFileBlk->pNext = m_pFileBlk;    pFileBlk->pFile = pFile;    m_pFileBlk = pFileBlk;  }  return pFile;}
开发者ID:ToMadoRe,项目名称:v4r,代码行数:12,


示例2: GetProtocolFactory

//删除协议上下文void IAppInterface::DeleteProtocolContext(ProtocolContext *context){    //释放protocol实例    IProtocolFactory *factory = GetProtocolFactory();    if(context->protocol != NULL)        factory->DeleteProtocol(context->protocol_type, context->protocol);    IMemory *memory = GetMemory();    assert(context!=NULL);    context->~ProtocolContext();    memory->Free((void*)context, sizeof(ProtocolContext));}
开发者ID:qqonline,项目名称:EasyNetFramework,代码行数:13,


示例3: GetMemory

//===========================================================================//// Parameter:			-// Returns:				-// Changes Globals:		-//===========================================================================node_t *AllocNode (void){	node_t	*node;	node = GetMemory(sizeof(*node));	memset (node, 0, sizeof(*node));	if (numthreads == 1)	{		c_nodememory += MemorySize(node);	} //end if	return node;} //end of the function AllocNode
开发者ID:Garux,项目名称:netradiant-custom,代码行数:18,


示例4: GetMemoryDebug

void *GetClearedMemory(unsigned long size)#endif //MEMDEBUG{	void *ptr;#ifdef MEMDEBUG	ptr = GetMemoryDebug(size, label, file, line);#else	ptr = GetMemory(size);#endif //MEMDEBUG	memset(ptr, 0, size);	return ptr;}
开发者ID:Ponce,项目名称:etlegacy,代码行数:12,


示例5: l

void InternalAllocator::ReleaseAllMemory(){	std::lock_guard<std::mutex> l(m_PagesMutex);	// walk all pages backwards and kill them	Page* next = m_Tail;	while(next) {		auto current = next;		next = current->GetPrevious();		current->~Page();		m_ExternalAllocator->Deallocate(current->GetMemory());	}}
开发者ID:thameera,项目名称:profi,代码行数:12,


示例6: GetMemory

//===========================================================================//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================libvar_t *LibVarAlloc( char *var_name ) {	libvar_t *v;	v = (libvar_t *) GetMemory( sizeof( libvar_t ) + strlen( var_name ) + 1 );	memset( v, 0, sizeof( libvar_t ) );	v->name = (char *) v + sizeof( libvar_t );	strcpy( v->name, var_name );	//add the variable in the list	v->next = libvarlist;	libvarlist = v;	return v;} //end of the function LibVarAlloc
开发者ID:JackalFrost,项目名称:RTCW-WSGF,代码行数:18,


示例7: InitUndo

/*	Alloc UNDO/REDO structures*/void InitUndo(){	// Check MaxUndo global var.	if ( MaxUndo < 1 )	MaxUndo = 1;	// Allocates MaxUndo+1 entries	if ( UndoArray == NULL )		UndoArray = (UndoData *)GetMemory (MaxUndo * sizeof(UndoData));	NbUndo = 0;	NextUndo = -1;}
开发者ID:Anonic,项目名称:Meridian59,代码行数:17,


示例8: GetLink

/**************************************************************功能:从 src 中分析出网页链接,并加入到当前节点的子节点上***************************************************************/void GetLink(char * src){	char * pa, * pb, * pc;	char * myanchor = 0;	int len = 0;	pa = src;	do	{		if((pb = strstr(pa, "href='")))		{			pc = strchr(pb + 6, '/'');			len = strlen(pb + 6) - strlen(pc);			GetMemory(&myanchor, len);			memcpy(myanchor, pb + 6, len);		}		else if((pb = strstr(pa, "href=/"")))		{			pc = strchr(pb + 6, '"');			len = strlen(pb + 6) - strlen(pc);			GetMemory(&myanchor, len);			memcpy(myanchor, pb + 6, len);		}		else if((pb = strstr(pa, "href=")))		{			GetAfterPosWithSlash(pb + 5, &pc);			len = strlen(pb + 5) - strlen(pc);			GetMemory(&myanchor, len);			memcpy(myanchor, pb + 5, len);		}		else {goto __returnLink ;}		if(strlen(myanchor) > 0)			AddChildNode(NodeCurr, myanchor);		if(pc + 1)			pa = pc + 1;	}while(pa);__returnLink:    return;}
开发者ID:landisliu,项目名称:project,代码行数:43,


示例9: GetLink

/**************************************************************功能:从 src 中分析出网页链接,并加入到当前节点的子节点上***************************************************************/void GetLink(char * src){char * pa, * pb, * pc;char * myanchor = 0;int len = 0;pa = src;do {if((pb = strstr(pa, "href='"))) {pc = strchr(pb + 6, '/'');len = strlen(pb + 6) - strlen(pc);GetMemory(&myanchor, len);memcpy(myanchor, pb + 6, len);}else if((pb = strstr(pa, "href=/""))) {pc = strchr(pb + 6, '"');len = strlen(pb + 6) - strlen(pc);GetMemory(&myanchor, len);memcpy(myanchor, pb + 6, len);}else if((pb = strstr(pa, "href="))) {GetAfterPosWithSlash(pb + 5, &pc);len = strlen(pb + 5) - strlen(pc);GetMemory(&myanchor, len);memcpy(myanchor, pb + 5, len);}else {goto __returnLink ;}/*if(DEBUG) {if(strcmp(NodeCurr->dir, "/")) fprintf(stdout, "%s/thttp://%s/%s/%s/n", myanchor, NodeCurr->host, NodeCurr->dir, strcmp(NodeCurr->page, "`")?NodeCurr->page:"");else fprintf(stdout, "%s/thttp://%s%s%s/n", myanchor, NodeCurr->host, NodeCurr->dir, strcmp(NodeCurr->page, "`")?NodeCurr->page:"");}*/if(strlen(myanchor) > 0) AddChildNode(NodeCurr, myanchor);if(pc + 1) pa = pc + 1;}while(pa);__returnLink:return;}
开发者ID:lumia70,项目名称:unp,代码行数:42,


示例10: AAS_UpdateStringIndexes

//===========================================================================//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================void AAS_UpdateStringIndexes( int numconfigstrings, char *configstrings[] ) {	int i;	//set string pointers and copy the strings	for ( i = 0; i < numconfigstrings; i++ )	{		if ( configstrings[i] ) {			//if ((*aasworld).configstrings[i]) FreeMemory((*aasworld).configstrings[i]);			( *aasworld ).configstrings[i] = (char *) GetMemory( strlen( configstrings[i] ) + 1 );			strcpy( ( *aasworld ).configstrings[i], configstrings[i] );		} //end if	} //end for	( *aasworld ).indexessetup = qtrue;} //end of the function AAS_UpdateStringIndexes
开发者ID:rfc1459,项目名称:RTCW-SP,代码行数:19,


示例11: AddThread

//===========================================================================//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================void AddThread( void ( *func )(int) ) {	thread_t *thread;	if ( numthreads == 1 ) {		if ( currentnumthreads >= numthreads ) {			return;		}		currentnumthreads++;		func( -1 );		currentnumthreads--;	} //end if	else	{		ThreadLock();		if ( currentnumthreads >= numthreads ) {			ThreadUnlock();			return;		} //end if		  //allocate new thread		thread = GetMemory( sizeof( thread_t ) );		if ( !thread ) {			Error( "can't allocate memory for thread/n" );		}		//		thread->threadid = currentthreadid;		thread->handle = CreateThread(			NULL,           // LPSECURITY_ATTRIBUTES lpsa,			0,              // DWORD cbStack,			(LPTHREAD_START_ROUTINE)func,           // LPTHREAD_START_ROUTINE lpStartAddr,			(LPVOID) thread->threadid,                  // LPVOID lpvThreadParm,			0,                              // DWORD fdwCreate,			&thread->id );		//add the thread to the end of the list		thread->next = NULL;		if ( lastthread ) {			lastthread->next = thread;		} else { firstthread = thread;}		lastthread = thread;		//#ifdef THREAD_DEBUG		qprintf( "added thread with id %d/n", thread->threadid );#endif //THREAD_DEBUG	   //		currentnumthreads++;		currentthreadid++;		//		ThreadUnlock();	} //end else} //end of the function AddThread
开发者ID:AdrienJaguenet,项目名称:Enemy-Territory,代码行数:57,


示例12: FindFileInPak

//===========================================================================// returns pointer to file handle// sets offset to and length of 'filename' in the pak file//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================qboolean FindFileInPak( char *pakfile, char *filename, foundfile_t *file ) {	FILE *fp;	dpackheader_t packheader;	dpackfile_t *packfiles;	int numdirs, i;	char path[MAX_PATH];	//open the pak file	fp = fopen( pakfile, "rb" );	if ( !fp ) {		return false;	} //end if	  //read pak header, check for valid pak id and seek to the dir entries	if ( ( fread( &packheader, 1, sizeof( dpackheader_t ), fp ) != sizeof( dpackheader_t ) )		 || ( packheader.ident != IDPAKHEADER )		 ||  ( fseek( fp, LittleLong( packheader.dirofs ), SEEK_SET ) )		 ) {		fclose( fp );		return false;	} //end if	  //number of dir entries in the pak file	numdirs = LittleLong( packheader.dirlen ) / sizeof( dpackfile_t );	packfiles = (dpackfile_t *) GetMemory( numdirs * sizeof( dpackfile_t ) );	//read the dir entry	if ( fread( packfiles, sizeof( dpackfile_t ), numdirs, fp ) != numdirs ) {		fclose( fp );		FreeMemory( packfiles );		return false;	} //end if	fclose( fp );	//	strcpy( path, filename );	ConvertPath( path );	//find the dir entry in the pak file	for ( i = 0; i < numdirs; i++ )	{		//convert the dir entry name		ConvertPath( packfiles[i].name );		//compare the dir entry name with the filename		if ( Q_strcasecmp( packfiles[i].name, path ) == 0 ) {			strcpy( file->filename, pakfile );			file->offset = LittleLong( packfiles[i].filepos );			file->length = LittleLong( packfiles[i].filelen );			FreeMemory( packfiles );			return true;		} //end if	} //end for	FreeMemory( packfiles );	return false;} //end of the function FindFileInPak
开发者ID:JackalFrost,项目名称:RTCW-WSGF,代码行数:58,


示例13: PS_CreatePunctuationTable

//===========================================================================//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================void PS_CreatePunctuationTable(script_t *script, punctuation_t *punctuations){	int           i;	punctuation_t *p, *lastp, *newp;	//get memory for the table	if (!script->punctuationtable)	{		script->punctuationtable = (punctuation_t **)		                           GetMemory(256 * sizeof(punctuation_t *));	}	memset(script->punctuationtable, 0, 256 * sizeof(punctuation_t *));	//add the punctuations in the list to the punctuation table	for (i = 0; punctuations[i].p; i++)	{		newp  = &punctuations[i];		lastp = NULL;		//sort the punctuations in this table entry on length (longer punctuations first)		for (p = script->punctuationtable[(unsigned int) newp->p[0]]; p; p = p->next)		{			if (strlen(p->p) < strlen(newp->p))			{				newp->next = p;				if (lastp)				{					lastp->next = newp;				}				else				{					script->punctuationtable[(unsigned int) newp->p[0]] = newp;				}				break;			} //end if			lastp = p;		} //end for		if (!p)		{			newp->next = NULL;			if (lastp)			{				lastp->next = newp;			}			else			{				script->punctuationtable[(unsigned int) newp->p[0]] = newp;			}		} //end if	} //end for} //end of the function PS_CreatePunctuationTable
开发者ID:BulldogDrummond,项目名称:etlegacy-mysql,代码行数:55,


示例14: GetMemory

struct Node *CreateNode(struct Seg *ts, const bbox_t bbox){	struct Node *tn;	struct Seg *rights = NULL;	struct Seg *lefts = NULL;	tn = GetMemory( sizeof( struct Node));				/* Create a node*/ 	DivideSegs(ts,&rights,&lefts,bbox);						/* Divide node in two*/	num_nodes++;	tn->x = node_x;											/* store node line info*/	tn->y = node_y;	tn->dx = node_dx;	tn->dy = node_dy;	FindLimits(lefts,tn->leftbox);				/* Find limits of vertices	*/	if(IsItConvex(lefts))	  								/* Check lefthand side*/		{	        if (verbosity > 1) Verbose("L");		tn->nextl = CreateNode(lefts,tn->leftbox);	/* still segs remaining*/		tn->chleft = 0;	        if (verbosity > 1) Verbose("/b");		}	else		{		tn->nextl = NULL;		tn->chleft = CreateSSector(lefts) | 0x8000;		}	FindLimits(rights, tn->rightbox);										/* Find limits of vertices*/		if(IsItConvex(rights))									/* Check righthand side*/		{	        if (verbosity > 1) Verbose("R");		tn->nextr = CreateNode(rights, tn->rightbox);	/* still segs remaining*/		tn->chright = 0;	        if (verbosity > 1) Verbose("/b");		}	else		{		tn->nextr = NULL;		tn->chright =  CreateSSector(rights) | 0x8000;		}	return tn;}
开发者ID:Nekrofage,项目名称:DoomRPi,代码行数:49,


示例15: GetMemory

void list<T>::push_back(T t){    void* mem = GetMemory(sizeof(node));    node* add = new (reinterpret_cast<yassl_pointer>(mem)) node(t);    if (tail_) {        tail_->next_ = add;        add->prev_ = tail_;    }    else        head_ = add;    tail_ = add;    ++sz_;}
开发者ID:0x00xw,项目名称:mysql-2,代码行数:15,


示例16: GetMemory

status_t BnMemory::Transact(	uint32_t code,								SParcel& data,								SParcel* reply,								uint32_t flags){	if (code == kGetMemory) {		ssize_t offset, size;		sptr<IMemoryHeap> heap = GetMemory(&offset, &size);		reply->WriteBinder(heap->AsBinder());		reply->WriteInt32(offset);		reply->WriteInt32(size);		return B_OK;	}	return BBinder::Transact(code, data, reply, flags);}
开发者ID:cambridgehackers,项目名称:openbinder-archive,代码行数:15,


示例17: SetKeyValue

void    SetKeyValue( entity_t *ent, char *key, char *value ) {	epair_t *ep;	for ( ep = ent->epairs ; ep ; ep = ep->next )		if ( !strcmp( ep->key, key ) ) {			FreeMemory( ep->value );			ep->value = copystring( value );			return;		}	ep = GetMemory( sizeof( *ep ) );	ep->next = ent->epairs;	ent->epairs = ep;	ep->key = copystring( key );	ep->value = copystring( value );}
开发者ID:D4edalus,项目名称:CoD4x_Server,代码行数:15,


示例18: fopen_s

void Dlg_MemBookmark::ImportFromFile( std::string sFilename ){	FILE* pFile = nullptr;	errno_t nErr = fopen_s( &pFile, sFilename.c_str(), "r" );	if ( pFile != nullptr )	{		Document doc;		doc.ParseStream( FileStream( pFile ) );		if ( !doc.HasParseError() )		{			if ( doc.HasMember( "Bookmarks" ) )			{				ClearAllBookmarks();				const Value& BookmarksData = doc[ "Bookmarks" ];				for ( SizeType i = 0; i < BookmarksData.Size(); ++i )				{					MemBookmark* NewBookmark = new MemBookmark();					wchar_t buffer[ 256 ];					swprintf_s ( buffer, 256, L"%s", Widen( BookmarksData[ i ][ "Description" ].GetString() ).c_str() );					NewBookmark->SetDescription ( buffer );					NewBookmark->SetAddress( BookmarksData[ i ][ "Address" ].GetUint() );					NewBookmark->SetType( BookmarksData[ i ][ "Type" ].GetInt() );					NewBookmark->SetDecimal( BookmarksData[ i ][ "Decimal" ].GetBool() );					NewBookmark->SetValue( GetMemory( NewBookmark->Address(), NewBookmark->Type() ) );					NewBookmark->SetPrevious ( NewBookmark->Value() );					AddBookmark ( NewBookmark );					AddBookmarkMap( NewBookmark );				}				if ( m_vBookmarks.size() > 0 )					PopulateList();			}			else			{				ASSERT ( " !Invalid Bookmark File..." );				MessageBox( nullptr, _T("Could not load properly. Invalid Bookmark file."), _T("Error"), MB_OK | MB_ICONERROR );				return;			}		}		fclose( pFile );	}}
开发者ID:SyrianBallaS,项目名称:RASuite,代码行数:48,


示例19: TRACE

//////////////////////////////////////////////////////////// TMapDC// ------//	Initialize GDI pen cachevoidTMapDC::InitCacheData(){	TRACE ("TMapDC::InitCacheData called");	if ( LastPens == NULL )	{		LastPens = (TPenColor16 **)GetMemory (COLOR16_CACHE_SIZE * sizeof (TPenColor16 *));		for (int i = 0 ; i < COLOR16_CACHE_SIZE ; i++)		{			LastPens[i] = 0;		}		atexit (CleanupCacheData);	}}
开发者ID:AlleyCat1976,项目名称:Meridian59_103,代码行数:20,


示例20: Q3_CopyLump

/*=============Q3_CopyLump=============*/int Q3_CopyLump( dheader_t	*header, int lump, void **dest, int size ) {    int		length, ofs;    length = header->lumps[lump].filelen;    ofs = header->lumps[lump].fileofs;    if ( length % size ) {        Error ("Q3_LoadBSPFile: odd lump size");    }    *dest = GetMemory(length);    memcpy( *dest, (byte *)header + ofs, length );    return length / size;}
开发者ID:tkmorris,项目名称:OpenMOHAA,代码行数:21,


示例21: GetMemory

//===========================================================================//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================bspbrush_t *AllocBrush( int numsides ) {	bspbrush_t  *bb;	int c;	c = (int)&( ( (bspbrush_t *)0 )->sides[numsides] );	bb = GetMemory( c );	memset( bb, 0, c );	if ( numthreads == 1 ) {		c_active_brushes++;		c_brushmemory += MemorySize( bb );		if ( c_brushmemory > c_peak_brushmemory ) {			c_peak_brushmemory = c_brushmemory;		}	} //end if	return bb;} //end of the function AllocBrush
开发者ID:JackalFrost,项目名称:RTCW-WSGF,代码行数:22,


示例22: BotInterpolateCharacters

//===========================================================================//// Parameter:			-// Returns:				-// Changes Globals:		-//===========================================================================int BotInterpolateCharacters( int handle1, int handle2, int desiredskill ) {	bot_character_t *ch1, *ch2, *out;	int i, handle;	float scale;	ch1 = BotCharacterFromHandle( handle1 );	ch2 = BotCharacterFromHandle( handle2 );	if ( !ch1 || !ch2 ) {		return 0;	}	//find a free spot for a character	for ( handle = 1; handle <= MAX_CLIENTS; handle++ )	{		if ( !botcharacters[handle] ) {			break;		}	} //end for	if ( handle > MAX_CLIENTS ) {		return 0;	}	out = (bot_character_t *) GetClearedMemory( sizeof( bot_character_t ) +												MAX_CHARACTERISTICS * sizeof( bot_characteristic_t ) );	out->skill = desiredskill;	strcpy( out->filename, ch1->filename );	botcharacters[handle] = out;	scale = (float) ( desiredskill - 1 ) / ( ch2->skill - ch1->skill );	for ( i = 0; i < MAX_CHARACTERISTICS; i++ )	{		//		if ( ch1->c[i].type == CT_FLOAT && ch2->c[i].type == CT_FLOAT ) {			out->c[i].type = CT_FLOAT;			out->c[i].value._float = ch1->c[i].value._float +									 ( ch2->c[i].value._float - ch1->c[i].value._float ) * scale;		} //end if		else if ( ch1->c[i].type == CT_INTEGER ) {			out->c[i].type = CT_INTEGER;			out->c[i].value.integer = ch1->c[i].value.integer;		} //end else if		else if ( ch1->c[i].type == CT_STRING ) {			out->c[i].type = CT_STRING;			out->c[i].value.string = (char *) GetMemory( strlen( ch1->c[i].value.string ) + 1 );			strcpy( out->c[i].value.string, ch1->c[i].value.string );		} //end else if	} //end for	return handle;} //end of the function BotInterpolateCharacters
开发者ID:Justasic,项目名称:RTCW-MP,代码行数:53,


示例23: sizeof

//===========================================================================//// Parameter:			-// Returns:				-// Changes Globals:		-//===========================================================================bspbrush_t *AllocBrush (int numsides){	bspbrush_t	*bb;	size_t		c;	c = sizeof(*bb) + sizeof(*bb->sides) * numsides;	bb = GetMemory(c);	memset (bb, 0, c);	if (numthreads == 1)	{		c_active_brushes++;		c_brushmemory += MemorySize(bb);		if (c_brushmemory > c_peak_brushmemory)				c_peak_brushmemory = c_brushmemory;	} //end if	return bb;} //end of the function AllocBrush
开发者ID:Garux,项目名称:netradiant-custom,代码行数:23,


示例24: LibVarGet

//===========================================================================//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================libvar_t *LibVar(char *var_name, char *value){	libvar_t *v;	v = LibVarGet(var_name);	if (v) return v;	//create new variable	v = LibVarAlloc(var_name);	//variable string	v->string = (char *)GetMemory((unsigned long)strlen(value) + 1);	strcpy(v->string, value);	//the value	v->value = LibVarStringValue(v->string);	//variable is modified	v->modified = qtrue;	//	return v;} //end of the function LibVar
开发者ID:ataceyhun,项目名称:jk2mv,代码行数:23,


示例25: AddFunctionName

/*=================AddFunctionName=================*/void AddFunctionName (char *funcname, char *filename, tokenList_t *head){	replacefunc_t *f;	tokenList_t     *list;	if ( FindFunctionName(funcname) )	{		return;	}#if defined( __linux__ ) || defined( __FreeBSD__ )	// the bad thing is, this doesn't preprocess .. on __linux__ this	// function is not implemented (q_math.c)	if ( !Q_stricmp( funcname, "BoxOnPlaneSide" ) ) {		return;	}#endif	// NERVE - SMF - workaround for Graeme's predifined MACOSX functions	// TTimo - looks like linux version needs to escape those too#if defined( _WIN32 ) || defined( __linux__ ) || defined( __FreeBSD__ )	if ( !Q_stricmp(funcname, "qmax") ) {		return;	}	else if ( !Q_stricmp(funcname, "qmin") ) {		return;	}#endif	// -NERVE - SMF	f = (replacefunc_t *) GetMemory( sizeof( replacefunc_t ) + strlen( funcname ) + 1 + 6 + strlen( filename ) + 1 );	f->name = (char *) f + sizeof( replacefunc_t );	strcpy( f->name, funcname );	f->newname = (char *) f + sizeof( replacefunc_t ) + strlen( funcname ) + 1;	sprintf( f->newname, "F%d", numfuncs++ );	f->filename = (char *) f + sizeof( replacefunc_t ) + strlen( funcname ) + 1 + strlen( f->newname ) + 1;	strcpy( f->filename, filename );	f->next = replacefuncs;	replacefuncs = f;	// construct the declaration	list = head;	f->dec[0] = '/0';	ConcatDec( list, f->dec, 0 );} //end of the function AddFunctionName
开发者ID:basecq,项目名称:q2dos,代码行数:51,


示例26: fopen

//获取文件内容bool AnalyseClassCallRelation::GetFile(const string &strPath, char *&pOuter, unsigned char byMenID){	FILE *fp; 	fp = fopen(strPath.c_str(), "rb");	if ( ! fp)	{		return false; 	}	fseek(fp, 0, SEEK_END); 	unsigned dwFileLen = ftell(fp);	rewind(fp);	char *pBuf = GetMemory(dwFileLen+1, byMenID); 	fread(pBuf, dwFileLen, 1, fp);	fclose(fp); 	pBuf[dwFileLen] = 0; 	pOuter = pBuf; 	return true; }
开发者ID:anzizhao,项目名称:MFCSofewareQuery,代码行数:19,


示例27: InitLevelItemHeap

//===========================================================================//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================void InitLevelItemHeap( void ) {	int i, max_levelitems;	if ( levelitemheap ) {		FreeMemory( levelitemheap );	}	max_levelitems = (int) LibVarValue( "max_levelitems", "256" );	levelitemheap = (levelitem_t *) GetMemory( max_levelitems * sizeof( levelitem_t ) );	for ( i = 0; i < max_levelitems - 2; i++ )	{		levelitemheap[i].next = &levelitemheap[i + 1];	} //end for	levelitemheap[max_levelitems - 1].next = NULL;	//	freelevelitems = levelitemheap;} //end of the function InitLevelItemHeap
开发者ID:JackalFrost,项目名称:RTCW-WSGF,代码行数:24,



注:本文中的GetMemory函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GetMemoryPathEnable函数代码示例
C++ GetMembersSize函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。