Re: Structure size directives



those who know me have no need of my name wrote:

Unaligned accesses to objects, should be banned. It has nothing
to do with portable C code, it might trigger a core dump on
non-x86 CPU.

even on x86 systems with the right option enabled.

but i think jacob's point is that people want these "dense"
struct's and that there should be a way to get the compiler to
emit the code necessary to marshall the data. some systems
would turn off or on some option while the program is running,
other systems would need the type of handling often seen in c
code for marshalling "plain" structs into and out of arrays of
unsigned char, etc...

This is opinion, but I think he, and they, are mistaken. Code has
quite different objectives today than it used to. There was a time
when memory was extremely precious, and we took almost all options
to economize it. Today, memory (and disk storage) is cheap, and we
use it freely. However nothing has reduced the need for clear and
understandable code.

BTW, please do not strip attributions for material you quote.

--
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>
Try the download section.



--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • Re: Structure size directives
    ... it might trigger a core dump on non-x86 CPU. ... even on x86 systems with the right option enabled. ... to marshall the data. ...
    (comp.lang.c)
  • [PATCH 0/7] coredump: core dump masking support v5
    ... This patch series is version 5 of the core dump masking feature, ... memory types and per-process flags. ... coredump_filter represents a bitmask of memory types, ... number of processes which share a huge shared memory are dumped at ...
    (Linux-Kernel)
  • Re: Help! SIGBUS (object specifc hardware error) when call function getline
    ... These core dump can be ... When we debug it with dbx, dbx tells us it's a object specific hardware ... HAT information describes how a memory page is mapped ... After loading a byte from register o4 to ...
    (comp.unix.solaris)
  • Re: Palette Quantization without unsafe code
    ... There's a difference between unsafe code which enables C# programs to access ... memory directly via pointers and marshaling between managed and unmanaged ... The Marshal class is the correct way to access unmanaged memory locations ... Is the code I write using Marshall have the benefits ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: mmaped memory in core files ?
    ... the core dump" in a recent core.5 man page: ... bit 2 Dump file-backed private mappings. ... Linux behavior and means that only anonymous memory segments are dumped. ... But your process never accesses them, only the kernel drivers do (to start and stop DMA programs and so on --- while the DMA programs and the DMA data buffers live in normal RAM). ...
    (Linux-Kernel)