[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] [C++]heap allokering?



Hej

On Wed, 2004-08-11 at 20:45, Anders Hellerup Madsen wrote:
> Problemet kommer når jeg har lyst til at bruge funktionerne til at 
> allokere plads til c++ objekter, altså som en slags erstatning for new 
> og delete. Kan det overhovedet lade sig gøre?

Ja, du kan overloade følgende metoder:

	void *operator new (size_t n);

	void operator delete (void *p);

	void *operator new[] (size_t n);

	void operator delete[] (void *p);

Ved hjælp af ovennævnte har jeg tidligere lavet et real-time C++ heap
system til anvendelse under RTKernel, så jeg ved det kan lade sig gøre.

Mvh
Brix
-- 
Henrik Brix Andersen <sslug@sslug>



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *