Re: Issues with memcpy

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

 



You could reorganize your struct so that the char is on the end.  Then
you could just do the memcpy with 9 bytes.  However, I have a feeling
that doing the full 12 byte copy may be faster... like others have
said, it depends on your achitecture.

  Brian

On 4/27/05, Javier Valencia <jvalencia@xxxxxxxxx> wrote:
> Thanks John, it was the problem, uninitialized struct.
> 
> To all: i understand now whats happening about aligned stuff, thanks!!
> 
> So what is the best way to copy a struct to a byte array without copying
> empty aligned spaces?
> I'm doing now the ugly way, just pointing to each field each time and
> copying to the buffer.
> 
> It's for transmition purposes.
>


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux