lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Purpose of memory alignment check


From: Mason
Subject: Re: [lwip-devel] Purpose of memory alignment check
Date: Tue, 13 Mar 2012 14:03:12 +0100
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Firefox/10.0.2 SeaMonkey/2.7.2

Bostjan Meglic wrote:

> On our architecture sizeof(void *) returns 2; that is 2 words.

sizeof(foo) returns the number of char (preferably unsigned char),
not words, required to store a foo. In other words, given

  void *foo;
  unsigned char arr[sizeof foo];

one can safely memcpy "foo" into "arr".

What is the value of CHAR_BIT on your platform, 8 or 16?
(Or some other exotic value?)

-- 
Regards.



reply via email to

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