Re: Policy on rebooting?
From: D. Zimmerman (7UPdzimmerman_at_stny.rr.com)
Date: 10/06/04
- Next message: Vadim Borshchev: "Re: Whats Better ???"
- Previous message: Vadim Borshchev: "Re: advanced? source code editor ala SunOne"
- In reply to: Paul Keinanen: "Re: Policy on rebooting?"
- Next in thread: Michael N. Moran: "Re: Policy on rebooting?"
- Reply: Michael N. Moran: "Re: Policy on rebooting?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 06 Oct 2004 13:08:30 GMT
Paul Keinanen wrote:
> On Wed, 6 Oct 2004 11:16:58 +0200, "mk" <REVERSE_lp.pw@myzskm.REMOVE>
> wrote:
>
>
>>Why is dynamic memory allocation bad idea?
>
>
> Fragmentation.
>
> After a few years of running the dynamic memory pool might not have 1
> KiB of _contiguous_ memory available, even if there is more than 1MiB
> of free dynamic memory scattered all a round in 1-1000 byte fragments
> and any malloc/new requests larger than 1 KiB will fail.
>
>
>>What does dynamic memory allocation have to do with virtual memory?
>
>
> With a few GiB of virtual memory, it only takes longer until the
> virtual memory is fragmented. The device might become obsolete and
> removed from service (or at least rebooted) before the whole virtual
> memory has been fragmented.
>
> With a fragmented virtual memory, the performance drops, since usually
> only part of each virtual memory page is in use, thus more pages must
> be loaded from the page file on disk, when for example accessing a
> linked list.
>
> Only if the virtual memory fragments are larger than the virtual
> memory page size, the unused pages are not loaded from the page file.
>
> Paul
>
This also depends on the operating system being used. Most
real time OS's, which are often used for embedded, will only
allocate fixed size memory blocks and will reclaim the
entire block. This prevents the problem Paul described.
Dennis,
-- If sending a reply you will need to remove "7UP".
- Next message: Vadim Borshchev: "Re: Whats Better ???"
- Previous message: Vadim Borshchev: "Re: advanced? source code editor ala SunOne"
- In reply to: Paul Keinanen: "Re: Policy on rebooting?"
- Next in thread: Michael N. Moran: "Re: Policy on rebooting?"
- Reply: Michael N. Moran: "Re: Policy on rebooting?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|