[haiku-development] Re: Help with memory allocation in WebKit JavaScriptCore

  • From: Marcus Overhagen <marcusoverhagen@xxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 16 Aug 2007 08:23:01 +0200 (CEST)

Bryan Varner wrote:

> #elif PLATFORM(HAIKU)
>     void *address = memalign(BLOCK_SIZE, BLOCK_SIZE);
>     memset(reinterpret_cast<void*>(address), 0, BLOCK_SIZE);
> #else

The reinterpret_cast isn't required, and if your code is written in
a way that it doesn't need 0 initialized memory, it makes sense
to fill the memory for debugging purposes with a different value,
for example 0xCC.

regards
Marcus

Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren
ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT FÜR ALLE NEUEINSTEIGER
Jetzt bei Arcor: günstig und schnell mit DSL - das All-Inclusive-Paket
für clevere Doppel-Sparer, nur  34,95 ?  inkl. DSL- und ISDN-Grundgebühr!
http://www.arcor.de/rd/emf-dsl-2

Other related posts: