Autor Beitrag
starsurfer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 334

Win 95, Win 98, Win XP, Win Vista, Linux
D5 Enterprise ,D2005, D6 Personal, Visual C++ Express 2005, C++ Builder 6 E, Dev-C++
BeitragVerfasst: So 23.07.06 20:34 
Abend DF,

ich habe seit längerem bemerkt das ein leeres(!) Delphi Programm bei mir 2MB(!) RAM verbraucht was mich an sich eher wenig gestört hat.

Nun habe ich aber ein ganz kleines Programm am laufen was mir nur die aktuelle Laufzeit des PC liefert und paar kleine andren Funktionen hat und dafür sind mit 3,3 MB RAM zu viel.

Was braucht da so viel RAM und wie bekomm ich den RAM Verbrauch runter?

_________________
GEIZ IST GEIL! - Ihr Sozialamt
rizla
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 417
Erhaltene Danke: 2

XP
FPC mit Lazarus
BeitragVerfasst: So 23.07.06 20:46 
Hmm.. gute Frage, aber wenn man bedenkt, dass der Code ja irgendwo in den Speicher muss :)
U.A. der, um den allocierten Speicher beim beenden wieder freizugeben (denk ich :gruebel:)
:r!a:

_________________
if you have what they want - they'll find a way to take it (bruce sterling)
WOW - 10 JAHRE Mitglied beim Delphi-Forum. Wie die Zeit vergeht, Freunde.
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: So 23.07.06 21:39 
Das werden wohl die VCL-Bibliotheken sein etc. pp. Aber auch wenn Du mit Win32-API direkt programmierst wirst Du wohl kaum spürbar unter 1 MB kommen.

Gruß,
raziel

_________________
JSXGraph
rizla
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 417
Erhaltene Danke: 2

XP
FPC mit Lazarus
BeitragVerfasst: So 23.07.06 21:44 
das kleinste dos-programm belegte immerhin 4 bytes:
ausblenden Quelltext
1:
2:
mov ah, 4ch
int 21h
ich lach mich schlapp, aber sind nette vergleiche

:r!a:

_________________
if you have what they want - they'll find a way to take it (bruce sterling)
WOW - 10 JAHRE Mitglied beim Delphi-Forum. Wie die Zeit vergeht, Freunde.
starsurfer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 334

Win 95, Win 98, Win XP, Win Vista, Linux
D5 Enterprise ,D2005, D6 Personal, Visual C++ Express 2005, C++ Builder 6 E, Dev-C++
BeitragVerfasst: Mo 24.07.06 07:43 
angenommen ich nehm mir die ganzen Uses die ich für das Projekt brauch und stell mir daraus eine zusammen in der nur die Funktionen drinne sind die ich wirklich brauch...würde das was helfen ?

_________________
GEIZ IST GEIL! - Ihr Sozialamt
crowley
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 406

Win XP, Win Vista, Mandriva, Ubuntu
Delphi 4-8, Delphi 2006, Delphi 2007
BeitragVerfasst: Mo 24.07.06 08:37 
in jedem falle... schau mal... wenn du z.B. ohne Forms auskommst, sparst du dir gut 300KB an Programmgröße... ähnlich wird's wohl auch mit dem RAM ausschauen ;)
SchwarzesShaaf666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 28

Win XP
D6 Pers
BeitragVerfasst: Mo 24.07.06 09:10 
Wie sieht das denn aus, wenn ich mehrere Formen habe und auf jeder (fast) die gleichen Units eingebunden werden? Verbraucht das Programm dann auch bei z.B. 5 Formen (Forms) auch 5x300kb Speicher?
crowley
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 406

Win XP, Win Vista, Mandriva, Ubuntu
Delphi 4-8, Delphi 2006, Delphi 2007
BeitragVerfasst: Mo 24.07.06 09:23 
nein, das nicht... jede "uses"- unit wird nur einmal eingebunden...

solltest aber mal schauen, welche du davon wirklich brauchst

oft kannst du z.B. auch graphics, messages, dialogs rausschmeissen...

C.