Re: What is a union?



You seem to have missed out the comment at the bottom regarding the 1k of
RAM, while a clear underestimate - it was there to say that they do have
their points...

But not in 99.99% of cases where RAM is a penny for a MB.

--
- Mark Randall
http://zetech.swehli.com

"Severian [MVP]" <severian@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:hs6r61dinsptb4esqtvhs0ufhl4j2c09m0@xxxxxxxxxx
> On Tue, 26 Apr 2005 02:02:50 +0100, "Mark Randall"
> <markyr@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>>>George Hester" <hesterloli@xxxxxxxxxxx> wrote:
>>> Since I am not sure what union is doing I'm not sure how to address
>>> this.
>>> Thanks.
>>> This is done with Visual Studio 6 SP5
>>
>>A union is a prehistoric structure that contains various different data
>>types, but only one of them at once. Used for super-efficent (and
>>nowerdays
>>rediculous) memory usage.
>
> You seem to assume that all programmers are currently working on
> machines with gigabytes of ram, but there are many other platforms
> than the desktop and server.
>
> C and C++ are used in very many enviroments. In many of them, unions
> are quite useful for saving memory.
>
> In other cases, such as machine-specific code, they can be useful for
> looking at the same data in different ways.
>
> --
> Phillip Crews aka Severian
> Microsoft MVP, Windows SDK
> Posting email address is real, but please post replies on the newsgroup.


.



Relevant Pages

  • Re: The SOLAR BUDGET is a Moral Issue
    ... >> Raleigh Myers wrote: ... Union of concerned Scientists are abit mor able ... >> The union of unconcerned scientists would be a better title. ... >>> RAM ...
    (sci.energy.hydrogen)
  • Re: What is a union?
    ... > machines with gigabytes of ram, but there are many other platforms ... of RAM, you're dead. ... So a union could make the difference between ...
    (microsoft.public.vc.language)
  • Re: Kernel Panic with ZFS
    ... shared with root and swap. ... But the unrecommended minimum is 1 GB for ZFS. ... I'm out of RAM. ... But I watched the memory usage and it didn't go up. ...
    (freebsd-current)
  • Re: Re: [9fans] system crash during compile
    ... You said your stats for memory usage did remain low. ... Couldn´t it be running out of the % of memory used by the kernel? ... > only 64MB of ram, but those days are long gone, right? ... I can't run Plan 9 in qemu on my main machine because my main machine ...
    (comp.os.plan9)
  • Re: Word2007 memory usage
    ... The document has to be corrupt. ... RAM. ... Tried opening in Word2007 the file I repaired with Word2003: Memory usage ... with far less pictures. ...
    (microsoft.public.word.application.errors)

Loading