[Oberon] ETHO-plugin on Windows 10

Dieter d.gloetzel at web.de
Sat Apr 30 14:44:28 CEST 2016


Hi everybody,

I just want to inform you that ETHO-plugin for Windows runs as good on 
Windows 10 as on Windows 7.

I did have some trouble because of a huge array (> 1000 MegaBytes), but 
this has been resolved by now.

EMIL Zeller comments on this:
=================================================================================================================
32-Bit Programme sind in Windows auf 2GB Speicher limitiert. Darin 
müssen Code, Heap und Stack Platz finden. Ihre Hauptdatenstruktur 
benötigt einen zusammenhängenden Block von > 1GB. Offensichtlich kann es 
passieren, dass kein so grosser Block mehr frei ist.

In der mit PELinker erstellten EXE-Version wird der ganze Code in einem 
Stück an einer niedrigen Adresse alloziert. Dadurch bleibt bis zur 2GB 
Limite ein grosses zusammenhängendes Stück frei.

In der Oberon-Umgebung werden die Module (mit Code) dynamisch auf dem 
Heap alloziert. Dadurch ensteht eine gewisse Fragmentierung des Heaps. 
Vorallem wenn man auch noch den Compiler verwendet und Module lädt und 
entlädt.

Sie könnten versuchen die Datenstruktur in kleinere Blöcke aufzuteilen. 
z.B.:

notes: ARRAY 24 OF POINTER TO ARRAY 3 OF ARRAY 500 OF ARRAY 64 OF NoteDesc;

Sie müssen beim initialisieren dann natürlich die 24 Arrays einzel 
allozieren.

i := 0; WHILE i < 24 DO NEW(notes[i]); INC(i) END;
=================================================================================================================
Shortened english version follows:
======================================
32-Bit programs are limited under Windows to 2 GB. In this space Code, 
Heap and Stack must fit in. The main data structure (of my program)  
needs a contiguous block of  > 1 GB.
Obviously it may happen that such a large block is not available.

In the EXE-version created with PELinker the whole code is allocated at 
a lower address. Therefore remains a larger space until the 2 GB limit.

In Oberon it may happen that the Heap gets fragmented through dynamic 
loading and unloading modules.

In my program I have the big array:

notes: POINTER TO ARRAY 24 OF ARRAY 3 OF ARRAY 500 OF ARRAY 64 OF NoteDesc;

Emil Zeller suggests instead:

     notes:  ARRAY 24 OF POINTER TO ARRAY 3 OF ARRAY 500 OF ARRAY 64 OF 
NoteDesc;

This will make smaller contiguous memory blocks and better fit in a 
fragmented memory structure.

Regards,
Dieter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20160430/599837c5/attachment.html>


More information about the Oberon mailing list