
DreamLight®
RAMLight is a memory management utility for multimedia developers
and web designers. It works with Macromedia Director or with Shockwave
in Netscape Navigator or Microsoft Internet Explorer.
When I ran into a memory fragmentation issue during the development
of Quipples, The Internet game show
of satirical riddles, I needed help tracking down the source
of the problem. So I turned to my old standby, DreamLight RAMLight.
I completely redesigned and improved it to help me track down this
slippery memory problem deep within the object oriented world of
the Autitons.
Previously, DreamLight RAMLight helped me track down and plug a
memory leak we were experiencing on the Windows version of one of
our hybrid CD-ROM projects, KeyQuest,
A Typing Adventure. The Macintosh version of the project was
fine, but when we ported it over to Windows we were experiencing
unexplained CD-ROM thrashing and GPF crashes. I had a hunch it was
memory related. I needed more information and control than were
available in Directors built in memory inspector or other memory
utilities Id seen. So, in a late night debugging session, I wrote
a preliminary rough draft of DreamLight RAMLight.
The DreamLight RAMLight thermometer readout first identified that
the problem was indeed a memory leak. Then the cast reports it generated
are what finally nailed the problem to the source. Sound cast members
werent being released in Director for Windows. I was so delighted
with how quickly this little utility enabled me to find and fix
the memory leak, that I decided to polish it off and offer DreamLight
RAMLight as a product. If it helped me so much, I thought it might
help other multimedia developers as well.
Warning: There are problems with the memory properties in Director on Windows, DreamLight RAMLight (or any other memory related Lingo) may not report actual memory use in Director on Windows since the freeBlock and the freeBytes Lingo properties may not function properly on Windows. These Lingo properties (and DreamLight RAMLight) will function properly in Director 7.0.2-8.5.1 on Macintosh. You can test if the freeBytes works on your Windows machine by putting the freeBytes in the watcher and opening some large files. the freeBytes should shrink appropriately, once available virtual memory begins to run low. If it does not, then the memory Lingo properties (and DreamLight RAMLight) may not work on your machine.
- Copy the DreamLight RAMLight.DCR movie file into the Xtras folder
within the Director folder.
- Open the movie that you are authoring in Director.
- Open DreamLight RAMLight under the Xtras menu.
- Open the movie that you are authoring in Director.
- Include the following code in your movie to allow opening of
DreamLight RAMLight from within your projector.
on keyDown
global gTestMode
-- set gTestMode to true in the startmovie handler
-- during your test and development phase.
if gTestMode then
if the commandDown AND the key = "R" then
open window "DreamLight RAMLight"
end if
end if
end keyDown
- Copy the DreamLight RAMLight.DCR file to the same folder as
your projector.
- When the projector is running, hit command-R or control-R. If
the RAMLight has been renamed, or it is in another folder, you
will get a standard file dialog and can locate the RAMLight that
way.
- Dont forget to remove DreamLight RAMLight before releasing
your product.
Heres a neat trick for Shockwave and web developers. DreamLight
RAMLight can track the memory use of any Shockwave movie, or any
other type of web page for that matter. You can try it right here,
right now.
- Open this DreamLight RAMLight page in Netscape. (Bookmark this
page)
http://DreamLight.com/webshop/utilities/ramlight.html
- Open DreamLight RAMLight in a new
browser window.
- Point the original browser window at whatever page you wish
to check.
DreamLight RAMLight will show the memory use for the entire
Netscape memory partition. The memory readings and the thermometer
will include impact from all currently open browser windows, plug-ins
(of all types), Shockwave movies, sounds, JavaScript and Java applets
currently running under Netscapes memory partition. It should also
work in any other browser that supports Shockwave.
This demo copy will only enable the RAM Thermometer. To use the
RAM Readouts, RAM Controls and RAM Reports during the development
of your own movies, order
the full version of DreamLight RAMLight.
The
DreamLight RAMLight thermometer provides a general overview of RAM
usage in a compact area. Its small size and quick update make it
the best view to maximize performance of the main movie while still
keeping an eye on RAM usage.
Simply raise the thermometers drop-down triangle to hide the lower
portions of the RAMLight.
Name |
Lingo/Comments |
UsedRAM |
the memorySize - the freeBytes |
Fragmentation |
the freeBytes - the freeBlock |
FreeBlock |
the freeBlock |
Help |
Pastes help into message
window or launches this web page. |
Speed |
Adjusts update speed to
slow (10S), medium (1S), or fast (0.1S). |
DropDown |
Open and close the lower
readout section of the RAMLight |
The
drop-down triangle next to the thermometer activates DreamLight
RAMLights readouts.
RAM readouts are translated into: B-Bytes, K-Kilobytes, M-Megabytes,
G-Gigabytes or T-Terabytes.
Time readouts are translated into:
T-Ticks, S-Seconds:Ticks, M-Minutes:Seconds:Ticks,
H-Hours:Minutes:Seconds, D-Days:Hours:Minutes.
Sym |
Name |
Lingo/Comments |
Fr |
FreeBytes |
the freeBytes |
Mx |
MaxFreeBytes |
maximum
value that the freeBytes has hit since RAMLight opened |
Mn |
MinFreeBytes |
minimum
value that the freeBytes has hit since RAMLight opened |
Bl |
FreeBlock |
the freeBlock |
Lk |
LeakedBytes |
MaxFreeBytes
- the freeBytes |
@ |
LeakRate |
LeakedBytes
/ RunTime (in seconds) |
Us |
UsedRAM |
the memorySize
- the freeBytes |
Fg |
Fragmentation |
Percent of the freeBytes
that are fragmented. (Fr -Bl)/ Fr |
Tl |
TotalRAM |
the memorySize |
RT |
Runtime |
The amount of
time that the RAMLight has been running |
The
drop-down triangle next to the Runtime readout activates DreamLight
RAMLights memory controls. The memory controls are not available
when run in a browser.
When you want to use the preload or unload functions, first select
a mode:
- MBR: Cast Members
- FRM: Frames
Enter numbers into the two white numerical fields for a range.
The first number is the start and the second is the end of the range.
If you set both range fields to 0, it will preload or unload ALL
frames or ALL cast members in the castLib number entered in the
LIB field. Enter 0 into all three fields to load or unload ALL cast
members in ALL castLibs. If a preload fails to load the entire range
specified, you will hear a beep and the range end field will be
changed to the actual last frame or member number that loaded.
The LT (LoadTime) field will display the time it took to perform
the memory function in T-Ticks, S-Seconds:Ticks,
M-Minutes:Seconds, H-Hours:Minutes
or D-Days:Hours.

|
|
 |
-- "-----------------------------------------------------------------"
-- "DreamLight(R) RAMLight(TM)"
-- "CAST REPORT"
-- "CastLib: 1-Internal Range: 1 - 20"
-- "-----------------------------------------------------------------"
-- "Member Name Type PP Size Loaded"
-- "-----------------------------------------------------------------"
-- " 1: BK Rect | shape | 3 | 208.00 B | 1"
-- " 2: Rule | shape | 3 | 205.00 B | 1"
-- " 3: RAMLight Title | text | 3 | 10466.00 B | 1"
-- " 4: ThermoBar | shape | 3 | 210.00 B | 1"
-- " 5: Shadow | shape | 3 | 207.00 B | 1"
-- " 6: DreamLight.com | text | 3 | 8992.00 B | 1"
-- " 7: RAMLight Scale | bitmap | 3 | 1375.00 B | 1"
-- " 11: HandCursor | bitmap | 3 | 327.00 B | 1"
-- " 12: HandCursor Mask | bitmap | 3 | 332.00 B | 1"
-- " 13: HELP | bitmap | 3 | 462.00 B | 1"
-- " 14: Speed -1 | bitmap | 3 | 48.00 B | 0"
-- " 15: Speed 0 | bitmap | 3 | 408.00 B | 1"
-- " 16: Speed 1 | bitmap | 3 | 48.00 B | 0"
-- " 17: Twidle0 | bitmap | 3 | 28.00 B | 0"
-- " 18: Twidle1 | bitmap | 3 | 368.00 B | 1"
-- "-----------------------------------------------------------------"
-- " RAM used by loaded cast: 23560.00 B"
-- " Total size of cast in range: 23684.00 B"
-- "-----------------------------------------------------------------"
Above is a sample DreamLight RAMLight cast report.
To run a RAM report first set the mode to MBR (Cast Member) or
FRM (Frame) and fill in a range and castLib if desired. Then press
the option key (alt on PC) and the preload and unload buttons will
change to report buttons. Press the preload report button (green)
if you only want to report about cast members that are currently
loaded in RAM. Press the unload report button (red) to report both
loaded and unloaded cast members. When running a frame report both
buttons function the same way. Pressing a report button will then
post a RAM report to the message window in Director. The RAM reports
are only available when run as a MIAW in Director.
The RAM reports include the following
information: |
Report Type |
Cast report or frame report |
Report Range |
Range of cast members or frame numbers |
CastLib |
CastLib number (and CastLib name on a cast report) |
Sprite Number |
for frame reports |
Member |
Member number |
Name |
Member name |
Type |
Member type |
PP |
Members purge priority |
Size |
Member size in same format as readouts with 2 decimal places
added |
Loaded |
0=unloaded, 1=loaded |
RAM Totals |
Total of RAM used |
Frame
Report
Be careful with the frame report since it moves the playback head
in the stage movie to each frame in the range. It then gives you
a cast report for each frame. Save your movie first and dont run
this report while your movie is playing. This report can trigger
frame based scripts, stepFrames, etc. and could be dangerous if
youre not careful. Since the playback head is moved to each frame,
it forces the cast members in that frame to load. So this report
is only useful if you wish to know what cast members are being loaded
in specific frames by the score. Keep in mind that running a frame
report completely changes what is currently loaded into RAM.
DreamLight RAMLight is written completely in Lingo as a MIAW
(movie in a window). It draws all its information from the following
Lingo properties:
Property |
Comments |
the freeBytes |
Indicates the total number of free bytes available. This includes
free memory within the applications memory partition. If Use
system temporary memory is activated on the Macintosh,
or if running under Windows virtual memory, it will also include
free memory available to the system which the application may
use. This is the most useful of the Lingo memory properties
across platforms. (Director 8.5 Windows Bugs, SEE BELOW) |
the freeBlock |
Indicates the largest contiguous block of memory available.
On the Macintosh this only reports the largest freeBlock in
the applications partition, which may not be the largest freeBlock
available if Use system temporary memory is activated. (Director 8.5 Windows Bugs, SEE BELOW) |
the MemorySize |
Indicates the amount of memory allocated to the program. On
the Macintosh this does not include any additional memory which
may be available when Use system temporary memory
is activated. Under Windows this simply returns the amount of
physical RAM that the machine has installed, which does not
include any additional memory available to the application through
the use of Windows virtual memory. Therefore this property
is really only useful on the Macintosh with Use system
temporary memory disabled, and not of much use at all
on Windows other than to check how much RAM is installed in
the machine. |
The size of member |
Indicates the number of bytes a cast member uses in memory.
This is used by the DreamLight RAMLight Reports. |
ramNeeded() |
Indicates the number of bytes needed for all cast members
in a range of frames. This is used by the DreamLight RAMLight
Frame Report. |
Based on how Lingos memory properties work, DreamLight RAMLight
is most accurate when run on the Macintosh with Use System Temporary
Memory disabled. When run on the Macintosh with Use System Temporary
Memory activated or when run under Windows virtual memory,
DreamLight RAMLight is limited by Lingos memory property limitations.
The most notable limitation is in the memorySize property.
Whenever the RAMLight notices that its maxFreeBytes (Mx)
is larger than the memorySize it switches to track how
much of the maxFreeBytes have been used, rather
than how much available memory has been used, since there is no
way for it to know how much total memory is actually available.
In this case UsedRAM (Us) will show how much of
the maxFreeBytes (Mx) have been used and TotalRam
(TL) will simply duplicate the maxFreeBytes.
The other limitation is only on the Macintosh with Use System
Temporary Memory activated. In this case, the FreeBlock
(Bl) readout shows the largest unused block within the
programs actual memory partition. It doesnt show the largest free
block that may be available in the system temporary memory. Therefore
Fragmentation (Fg) only shows fragmentation of
the application partition, which is not necessarily fragmentation
of all the available memory.
Due to these Lingo limitations we recommend doing your memory
investigations on the Macintosh with Use System Temporary
Memory deactivated. Once you are satisfied with how your application
runs that way, then you can turn on Use System Temporary Memory
and/or run it under Windows virtual memory. Maybe in a future version
of Director, Lingo will overcome these limitations in the memorySize
and the freeBlock.
Warning: There are problems with the memory properties in Director on Windows, DreamLight RAMLight (or any other memory related Lingo) may not report actual memory use in Director on Windows since the freeBlock and the freeBytes Lingo properties may not function properly on Windows. These Lingo properties (and DreamLight RAMLight) will function properly in Director 7.0.2-8.5.1 on Macintosh. You can test if the freeBytes works on your Windows machine by putting the freeBytes in the watcher and opening some large files. the freeBytes should shrink appropriately, once available virtual memory begins to run low. If it does not, then the memory Lingo properties (and DreamLight RAMLight) may not work on your machine.
Version 3.0 updated in Director 7.0.2: 07/14/00
Completely updated and expanded in a week-long debugging session
hunting down and killing a D7 memory leak/fragmentation bug during
our development of Quipples: The Internet
game show of satirical riddles.
- Redesigned to allow closing of everything but the thermometer.
- Separated into three panels, thermometer, readouts, controls.
- Added fast, medium and slow update speeds.
- Added tracking of MaxFree, MinFree, Leaked Bytes, Leak Rate
and Fragmentation percent to help track down memory leaks and
memory fragmentation issues.
- Added tracking of Run Time to help in long running memory tests.
- Reformatted the RAM Reports for improved readability.
Version 2.1 updated in Director 6.0.2: 10/9/98
- Fixed a bug where loading all cast members only loaded from
cast lib 1. Now it loads from whichever castLib is specified.
Version 2.0 updated in Director 6.0.2: 10/8/98
- Added support for higher memory quantities. Fields now output
in B-Bytes, K-Kilobytes, M-Megabytes, G-Gigabytes and T-Terabytes.
- Changed time readout to adjust for different time scales including
the following: T-Ticks, S-Seconds, M-Minutes, H-Hours and D-Days.
- Added support for using system temporary memory on the Macintosh.
- Added support for multiple cast libraries.
Version 1.0 written in Director 4: 7/1/96
Created during a weekend debugging session hunting down and killing
a Director 4 puppetSound memory leak that surfaced during our development
of the CD-ROM -- KeyQuest:
A Typing Adventure.

|
|
 |
Warning: There are problems with the memory properties in Director on Windows, DreamLight RAMLight (or any other memory related Lingo) may not report actual memory use in Director on Windows since the freeBlock and the freeBytes Lingo properties may not function properly on Windows. These Lingo properties (and DreamLight RAMLight) will function properly in Director 7.0.2-8.5.1 on Macintosh. You can test if the freeBytes works on your Windows machine by putting the freeBytes in the watcher and opening some large files. the freeBytes should shrink appropriately, once available virtual memory begins to run low. If it does not, then the memory Lingo properties (and DreamLight RAMLight) may not work on your machine.
Most of the problems associated with DreamLight RAMLight arise
from Director for Windows MIAW bugs. There are a few outstanding
Director bugs related to the rect of window under Windows.
Therefore, we have disabled the MIAW window resizing code under Windows, and simply dim the areas that are not currently activated.
You may contact DreamLight by e-mail. Only DreamLight RAMLight
specific questions will be handled. Please send a complete description
of your DreamLight RAMLight problem, including a complete profile
of your system, via our contact
form.
Due to the low cost of this software, telephone support is not
available.
TM & (C) Copyright 1996-2001 DreamLight Incorporated.
All Rights Reserved.
DreamLight RAMLight is exclusively intended for use by the original
purchaser and is non transferable. By downloading DreamLight
RAMLight you are agreeing to these restrictions.
DreamLight(R) RAMLight(TM) is a commercial utility. It is not
in the public domain. It remains the property of DreamLight Incorporated.
It may not be distributed, redistributed, posted for downloads,
sold, used as an inducement to purchase any other items, bundled
with any other items or altered in any way without the express written
consent of DreamLight Incorporated.
DreamLight RAMLight is provided as-is. Use at your own risk.
DreamLight makes no warranties whatsoever regarding this item or
its use in any way. DreamLights liability is limited exclusively
to a refund of your DreamLight RAMLight license fee.
DreamLight is a registered trademark of DreamLight Incorporated.
DreamLight RAMLight is a trademark of DreamLight Incorporated.
Created by Michael Scaramozzino
DreamLight
Interactive
Releases New ScreamerNet UB Launcher
DLI_SNUB-Launcher™ is
an XCode Aqua GUI front end to interactively configure and
launch multiple LightWave
9.3-9.6 ScreamerNet UB instances for standalone, batch
and network rendering. Download
your copy today!
Created by the author of Mastering
LightWave ScreamerNet Rendering for Mac OS X, Michael Scaramozzino
- LightWave
3D Artist Profile.

|