Re: DRAM data persistence
- From: nico@xxxxxxxxxxx (Nico Coesel)
- Date: Wed, 04 Jul 2007 17:13:42 GMT
Jan Panteltje <pNaonStpealmtje@xxxxxxxxx> wrote:
On a sunny day (Tue, 03 Jul 2007 17:46:11 GMT) it happened nico@xxxxxxxxxxx
(Nico Coesel) wrote in <468a8b04.933624270@xxxxxxxxxxxxxx>:
I doubt it. Any modern OS clears the memory before freeing it for use
by other tasks.
This is not correct.
This is very correct otherwise there would be a huge security hole.
There are 2 ways to claim memory, and 'malloc()" is the usual way:
- Function: void * malloc (size_t SIZE)
This function returns a pointer to a newly allocated block SIZE
bytes long, or a null pointer if the block could not be allocated.
The contents of the block are undefined; you must initialize it
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
yourself (or use
alloc' instead; *note Allocating Cleared Space::).
Function: void * calloc (size_t COUNT, size_t ELTSIZE)
This function allocates a block long enough to contain a vector of
COUNT elements, each of size ELTSIZE. Its contents are cleared to
zero before
alloc' returns.
You are qouting the C specification. This doesn't mean it is
implemented that way it just tells you you must expect rubbish. But
like I said, to be absolutely sure no data can be shared between
different tasks unintended, any data used by an application is cleared
(this does not necessarely mean made 0) by the OS before it is
returned to the memory allocation pool.
--
Reply to nico@nctdevpuntnl (punt=.)
Bedrijven en winkels vindt U op www.adresboekje.nl
.
- Follow-Ups:
- Re: DRAM data persistence
- From: Haude Daniel
- Re: DRAM data persistence
- From: Jan Panteltje
- Re: DRAM data persistence
- From: MooseFET
- Re: DRAM data persistence
- References:
- DRAM data persistence
- From: Richard Henry
- Re: DRAM data persistence
- From: MooseFET
- Re: DRAM data persistence
- From: Nico Coesel
- Re: DRAM data persistence
- From: Jan Panteltje
- DRAM data persistence
- Prev by Date: Re: Happy 4th to USA
- Next by Date: Re: Heartburn of the Day
- Previous by thread: Re: DRAM data persistence
- Next by thread: Re: DRAM data persistence
- Index(es):
Relevant Pages
|