performance - How do I do something like a memcpy in D -


I have a storage space and I want to copy a byte of a certain location to another, how do I do this Can I in D?

For example, how do I do this:

  int main () {void * src_data = 0x40001255; Zero * dst_data = 0x47F22000; U32 size = 0x200; Memcpy (dst_data, src_data, size); }   

In addition to how to fill up a faster structure:

  struct data_struct {u32 block1; U32 block 2; U32 Block 3; U32 block 4; U32 block 5; U62 Block 6; U128 big blocks; } Data_struct_t; Int main () {zero * src_data = 0x40001255; Struct data_struct_t dst_data; U32 size = data_struct; Memcpy (dst_data, src_data, size); }   

Thanks! Reel will submit an array copy to a piece, which internally calls memcpy.

Zero main () {zero * src_data = 0x40001255; Zero * dst_data = 0x47F22000; UIT size = 0x200; Dst_data [0..size] = src_data [0..size]; }

for another:

  struct data_struct {uint block1, block2, block3, block4, block5; Ulhone Block 6; UIT [4] big block; } Zero main () {auto src_data = cast (data_struct *) 0x40001255; // Unlocked, WTF?! Auto-dst_data = * src_data; }    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -