lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #47172] mem.c mem_malloc implementation does not prope


From: David Fernandez
Subject: [lwip-devel] [bug #47172] mem.c mem_malloc implementation does not properly account for MEM_ALIGNMENT
Date: Thu, 18 Feb 2016 21:34:06 +0000
User-agent: Mozilla/5.0 (Linux; Android 4.4.2; GT-N7100 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.95 Mobile Safari/537.36

Follow-up Comment #7, bug #47172 (project lwip):

In some hardwares' memory buses, the alignment gap is also read with the data,
then thrown away by the cpu.

If the memory implements parity or ecc checking, you have to write to the
alignment gap to set the ecc or parity bits properly.

That "feature" may be used to catch reads to uninitialized memory, but given
how the memory bus works, you have to write to the alignment gap, as the
writes do use byte enables, for obvious reasons.

I hope that clarifies why we need to write to the alignment gap.

Now zeroizing all the memory is a way forward, but writing to the alignment
gap only, provides a way to catch wrong reads, which is nice to have.

Again, not saying lwip is wrong, only saying that if it provides this option,
allows some users to avoid doing ugly things to get what they want.


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?47172>

_______________________________________________
  Mensaje enviado vía/por Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]