Mail Archives: djgpp/1998/10/21/02:59:26
On Wed, 21 Oct 1998, Ludvig Larsson wrote:
> the memory chunk to clear is just allocated with malloc().
malloc returns aligned memory, but do you clear the buffer starting
at the beginning of what malloc returned?
For example, the following snippet will get tremendously slowed-down by
unaligned accesses:
unsigned char *buf = (unsigned char *) malloc (buf_size);
clear_buf (buf + 1, buf_size - 1);
(where clear_buf stands for your inline assembly stuff).
- Raw text -