Re: Follow up on an old thread about memoryutilization
At 04:21 PM 12/5/96 -0800, you wrote:
This thread was active a few months ago, unfortunately its taken me until now
for me to have enough spare time to craft a response.
Derek,
Thank you for finally giving me a more in-depth explanation of some of the
complexities of automatic memory management. I am certain that when you get
these and other problems ironed out, that it will be a very powerful
feature. In the meantime, however, all we have is this list of things that
we can do to "help" the memory manager. I don't mean to be difficult or
stubborn here, but I am having a hard time seeing how this is any
improvement handling the memory myself. If I must still be concerned about
freeing the object references, then what has the memory manager gained for
me?
In fact, it is actually more difficult, because I do not have the
destructor methods available to me. When I have a class that contains
other objects, I usually instantiate those objects or arrays in the Init()
method for that class. The cleanest and most natural place to "nil" those
same objects or clear() the arrays would usually be in the destructor
method for the same class. I can understand that you would not want to
allow the destructor to be invoked manually, but I do not understand why we
cannot provide cleanup code to be executed whenever an object is being
destroyed.
In short, I am standing by my original statement, which is simply that it
is a weakness in the tool, if it claims to automatically handle memory
management for you, but fails to do so completely or consistently. I can
see that you are attempting to address that weakness, and I trust you will
be successful. At that point, I will join you in singing the praises of
automatic memory management.
By the way, I also do not understand why we must explicitly instantiate
each object. It seems to me that if you are truly handling memory
automatically, then the "new" would be invoked automatically as soon as it
is needed. I know that is the way it works in other tools that attempt to
handle memory for you. This is no big deal, just a philosophical question.
Are you doing automatic memory management, or just automatic memory freeing?
--Jeanne
=====================================================================
Jeanne Hesler [email protected]
=====================================================================
I beleive he means to reformat it like a floppy disk.
Go into My Computer, Locate the drive letter associated with your iPod(normally says iPod in it, and shows under removable storage).
Right click on it and choose format - make sure to not have the "quick format" option checked. Then let it format.
If that doesnt work, There are steps somewhere in the 5th gen forum( dont have the link off hand) to try to use the usbstor.sys to update the USB drivers for the Nano/5th gen.
Similar Messages
-
Follow up on an old thread about memory utilization
This thread was active a few months ago, unfortunately its taken me until now
for me to have enough spare time to craft a response.
From: SMTP%"[email protected]" 3-SEP-1996 16:52:00.72
To: [email protected]
CC:
Subj: Re: memory utilization
As a general rule, I would agree that memory utilzation problems tend to be
developer-induced. I believe that is generally true for most development
environments. However, this developer was having a little trouble finding
out how NOT to induce them. After scouring the documentation for any
references to object destructors, or clearing memory, or garbage collection,
or freeing objects, or anything else we could think of, all we found was how
to clear the rows from an Array object. We did find some reference to
setting the object to NIL, but no indication that this was necessary for the
memory to be freed.
I believe the documentation, and probably some Tech-Notes, address the issue of
freeing memory.
Automatic memory management frees a memory object when no references to the
memory
object exist. Since references are the reason that a memory object lives,
removing
the references is the only way that memory objects can be freed. This is why the
manuals and Tech-Notes talk about setting references to NIL (I.E. freeing memory
in an automatic system is done by NILing references and not by calling freeing
routines.) This is not an absolute requirement (as you have probably noticed
that
most things are freed even without setting references to NIL) but it accelerates
the freeing of 'dead' objects and reduces the memory utilization because it
tends
to carry around less 'dead' objects.
It is my understanding that in this environment, the development tool
(Forte') claims to handle memory utilization and garbage collection for you.
If that is the case, then it is my opinion that it shoud be nearly
impossible for the developer to create memory-leakage problems without going
outside the tool and allocating the memory directly. If that is not the
case, then we should have destructor methods available to us so that we can
handle them correctly. I know when I am finished with an object, and I
would have no problem calling a "destroy" or "cleanup" method. In fact, I
would prefer that to just wondering if Forte' will take care of it for me.
It is actually quite easy to create memory leaks. Here are some examples:
Have a heap attribute in a service object. Keep inserting things into
the heap and never take them out (I.E. forgot to take them out). Since
service objects are always live, everything in the heap is also live.
Have an exception handler that catches exceptions and doesn't do
anything
with the error manager stack (I.E. it doesn't call task.ErrMgr.Clear).
If the handler is activated repeatedly in the same task, the stack of
exceptions will grow until you run out of memory or the task terminates
(task termination empties the error manager stack.)
It seems to me that this is a weakness in the tool that should be addressed.
Does anyone else have any opinions on this subject?
Actually, the implementation of the advanced features supported by the Forte
product
results in some complications in areas that can be hard to explain. Memory
management
happens to be one of the areas most effected. A precise explanation to a
non-deterministic process is not possible, but the following attempts to
explain the
source of the non-determinism.
o The ability to call from compiled C++ to interpreted TOOL and back
to compiled C++.
This single ability causes most of the strange effects mentioned in
this thread.
For C++ code the location of all variables local to a method is not
know
(I.E. C++ compilers can't tell you at run-time what is a variable
and what
isn't.) We use the pessimistic assumption that anything that looks
like a
reference to a memory object is a reference to a memory object. For
interpreted
TOOL code the interpreter has exact knowledge of what is a reference
and what
isn't. But the TOOL interpreter is itself a C++ method. This means
that any
any memory objects referenced by the interpreter during the
execution of TOOL
code could be stored in local variables in the interpreter. The TOOL
interpreter
runs until the TOOL code returns or the TOOL code calls into C++.
This means
that many levels of nested TOOL code can be the source of values
assigned to
local variables in the TOOL interpreter.
This is the complicated reason that answers the question: Why doesn't a
variable that is created and only used in a TOOL method that has
returned
get freed? It is likely that the variable is referenced by local
variables
in the TOOL interpreter method. This is also why setting the
variable to NIL
before returning doesn't seem to help. If the variable in question is a
Array than invoke Clear() on the Array seems to help, because even
though the
Array is still live the objects referenced by the Array have less
references.
The other common occurrence of this effect is in a TextData that
contains a
large string. In this case, invoking SetAllocatedSize(0) can be used
to NIL
the reference to the memory object that actually holds the sequence of
characters. Compositions of Arrays and TextData's (I.E. a Array of
TextData's
that all have large TextDatas.) can lead to even more problems.
When the TOOL code is turned into a compiled partition this effect
is not
noticed because the TOOL interpreter doesn't come into play and
things execute
the way most people expect. This is one area that we try to improve
upon, but it is complicated by the 15 different platforms, and thus
C++ compilers,
that we support. Changes that work on some machines behave
differently on other
machines. At this point in time, it occasionally still requires that
a TOOL
programmer actively address problems. Obviously we try to reduce
this need over
time.
o Automatic memory management for C++ with support for multi-processor
threads.
Supporting automatic memory management for C++ is something that is
not a very
common feature. It requires a coding standard that defines what is
acceptable and
what isn't. Additionally, supporting multi-processor threads adds
its own set of
complications. Luckily TOOL users are insulated from this because
the TOOL to C++
code generator knows the coding standard. In the end you are
impacted by the C++
compiler and possibly the differences that occur between different
compilers and/or
different processors (I.E. Intel X86 versus Alpha.) We have seen
applications that
had memory utilization differences of up to 2:1.
There are two primary sources of differences.
The first source is how compilers deal with dead assignments. The
typical TOOL
fragment that is being memory manager friendly might perform the
following:
temp : SomeObject = new;
... // Use someObject
temp = NIL;
return;
When this is translated to C++ it looks very similar in that temp
will be assigned the
value NULL. Most compilers are smart enough to notice that 'temp' is
never used again
because the method is going to return immediately. So they skip
setting 'temp' to NULL.
In this case it should be harmless that the statement was ignored
(see next example for a different variation.) In more
complicated examples that involve loops (especially long
lived event loops) a missed NIL assignment can lead to leaking the
memory object whose
reference didn't get set to NIL (incidentally this is the type of
problem that causes
the TOOL interpreter to leak references.)
The second source is a complicated interaction caused by history of
method invocations.
Consider the following:
Method A() invokes method B() which invokes method C().
Method C() allocates a temporary TextData, invokes
SetAllocatedSize(1000000)
does some more work and then returns.
Method B() returns.
Method A() now invokes method D().
Method D() allocates something that cause the memory manager to look
for memory objects to free.
Now, even though we have returned out of method C() we have starting
invoking
methods. This causes us to use re-use portions of the C++ stack used to
maintain the history of method invocation and space for local variables.
There is some probability that the reference to the 'temporary' TextData
will now be visible to the memory manager because it was not overwritten
by the invocation of D() or anything invoked by method D().
This example answers questions of the form: Why does setting a local
variable to
NIL and returning and then invoking task.Part.Os.RecoverMemory not
cause the
object referenced by the local variable to be freed?
In most cases these effects cause memory utilization to be slightly
higher
than expected (in well behaved cases it's less than 5%.) This is a small
price to pay for the advantages of automatic memory management.
An object-oriented programming style supported by automatic memory
management makes it
easy to extended existing objects or sets of objects by composition.
For example:
Method A() calls method B() to get the next record from the
database. Method B()
is used because we always get records, objects, of a certain
type from
method B() so that we can reuse code.
Method A() enters each row into a hash table so that it can
implement a cache
of the last N records seen.
Method A() returns the record to its caller.
With manual memory management there would have to be some interface
that allows
Method A() and/or the caller of A() to free the record. This
requires
that the programmer have a lot more knowledge about the
various projects
and classes that make up the application. If freeing doesn'
happen you
have a memory leak, if you free something while its still
being used the
results are unpredictable and most often fatal.
With automatic memory management, method A() can 'free' its
reference by removing
the reference from the hash table. The caller can 'free' its
reference by
either setting the reference to NIL or getting another
record and referring
to the new record instead of the old record.
Unfortunately, this convenience and power doesn't come for free. Consider
the following,
which comes from the Forte' run-time system:
A Window-class object is a very complex beast. It is composed of two
primary parts:
the UserWindow object which contains the variables declared by the
user, and the
Window object which contains the object representation of the window
created in
the window workshop. The UserWindow and the Window reference each
other. The Window
references the Menu and each Widget placed on the Window directly. A
compound Window
object, like a Panel, can also have objects place in itself. These
are typically
called the children. Each of the children also has to know the
identity of it's
Mom so they refer to there parent object. It should be reasonably
obvious that
starting from any object that make up the window any other object
can be found.
This means that if the memory manager finds a reference to any
object in the Window
it can also find all other objects in the window. Now if a reference
to any object
in the Window can be found on the program stack, all objects in the
window can
also be found. Since there are so many objects and the work involved
in displaying
a window can be very complicated (I.E. the automatic geometry
management that
layouts the window when it is first opened or resized.) there are
potentially many
different reference that would cause the same problem. This leads to
a higher than
normal probability that a reference exists that can cause the whole
set of Window
objects to not be freed.
We solved this problem in the following fashion:
Added a new Method called RecycleMemory() on UserWindow.
Documented that when a window is not going to be used again
that it is
preferably that RecycleMemory() is invoked instead
of Close().
The RecycleMemory() method basically sets all references
from parent to
child to NIL and sets all references from child to
parent to NIL.
Thus all objects are isolated from other objects
that make up
the window.
Changed a few methods on UserWindow, like Open(), to check
if the caller
is trying to open a recycled window and throw an
exception.
This was feasible because the code to traverse the parent/child
relationship
ready existed and was being used at close time to perform other
bookkeeping
operations on each of the Widgets.
To summarize:
Automatic memory management is less error prone and more productive but
doesn't come totally for free.
There are things that the programmer can do that assists the memory
manager:
o Set object reference to NIL when known to be correct (this
is the
way the memory is deallocated in an automatic system.)
o Use methods like Clear() on Array and SetAllocatedSize()
on TextData to
that allow these objects to set their internal
references to NIL
when known to be correct.
o Use the RecycleMemory() method on windows, especially very
complicated
windows.
o Build similar type of methods into your own objects when
needed.
o If you build highly connected structures that are very
large in the
number of object involved think that how it might be
broken
apart gracefully (it defeats some of the purpose of
automatic
management to go to great lengths to deal with the
problem.)
o Since program stacks are the source of the 'noise'
references, try
and do things with less tasks (this was one of the
reasons that
we implemented event handlers so that a single task
can control
many different windows.)
Even after doing all this its easy to still have a problem.
Internally we have
access to special tools that can help point at the problem so that
it can be
solved. We are attempting to give users UNSUPPORTED access to these
tools for
Release 3. This should allow users to more easily diagnose problems.
It also
tends to enlighten one about how things are structured and/or point out
inconsistencies that are the source of known/unknown bugs.
Derek
Derek Frankforth [email protected]
Forte Software Inc. [email protected]
1800 Harrison St. +510.869.3407
Oakland CA, 94612I beleive he means to reformat it like a floppy disk.
Go into My Computer, Locate the drive letter associated with your iPod(normally says iPod in it, and shows under removable storage).
Right click on it and choose format - make sure to not have the "quick format" option checked. Then let it format.
If that doesnt work, There are steps somewhere in the 5th gen forum( dont have the link off hand) to try to use the usbstor.sys to update the USB drivers for the Nano/5th gen. -
When I open a link from Microsoft outlook I get the following error
"An error occured sending command to application" The old thread on this does not help and it is closed.
== This happened ==
Every time Firefox openedHello Anonymous.
You will need to contact Microsoft for support on Outlook. -
Where could i find the old threads?
Hi i am searching for the following thread about usage of ref cursors in viewobjects:
Re: oracle 10g
Does anybody know where i could find now this thread?
Thanx,
MarcI'm interested in this too. Is there any way to
translate old posting id's into new urls? I've got a
lot of bookmarks to interesting forum threads that I
still need, and they all don't work anymore. Hi,
I also noticed the same problem. It seems we will have to push on the Forums team, as they state (at least, this is what I understood) that the old links are no more usable.
Please come and support this in the Feedback forum!
Thank you all.
Adrian -
Can't the old threads closed automatically?
Hi,
I am just thinking why can't the old threads closed automatically?
There are lot of old threads which might got resolved OR might not have proper responses, appearing in every forum.
If we have a functionality which close the thread with a tag "Expired" after 5 days (from the query raised date), that can help all of the volunteers.
I do not see any benefit in keeping those threads active!
Regards,
Nick LoyIf you work in a bigger company, then 5 days are almost nothing.
SAP has such a nice CHarm process to make the environment secure, that means you cant even start developing something without having an approved change request. Not to talk about testing.
Of course there are discussions which can be be closed immediately, others need weeks, some months. I still get some helpful and correct answer points from answers I had given years ago.
Without the "automatic" closure, you actually have evidence if the user takes care about his stuff or not, the auto closure makes this unresponsive user just look equal to someone who cares. Even more bad. There is no real filter function in SCN to search only for answered questions, and you would miss a lot answered discussions which are not techncially marked answered.
I actually had some spare time last weekend, and I reviewed ANY discussions posted between May 15 and May 30 in the MM forum having an answer and have not been closed . I wrote a single direct message and included all OPs into the distribution list:
You posted a question in SCN MM forum in last week of May. This question is still open despite of many answers. Is the issue really open and you don't follow up on it? If not open then please close your discussion. If you found the solution yourself, then share it. Check out the blog post 'How to close a discussion and why' in SCN.
Yes I had some good responses to the direct message. Yes some of them have closed their discussion from May, quite a few posted a solution. Some do not understand at all what "correct answer" actually means and marked their own "thank you" as correct answer. And some others which are already known as careless did neither respond nor close any of their discussions, they are just going on and posting the next question. -
Hi,
I was trying to follow a link to an old thread as mentioned in the last post of Re: JPS Tool in Java 6 update 1 but it's obviously not working anymore.
Any chance I can still find that thread using the forumID and threadID URL parameters? And no, I don't have the title of that topic - that's all the info I have :/
Here's the mentioned URL:
http://forum.java.sun.com/thread.jspa?forumID=537&threadID=5133218
Thanks.878018 wrote:
Any chance I can still find that thread using the forumID and threadID URL parameters? No, but [url http://forums.oracle.com/forums/search.jspa?threadID=&q=JPS+AND+Tool&objID=f934&dateRange=all&userID=&numResults=15&rankBy=10001]this search may help. If it doesn't, you could always start your own thread in an appropriate section of the forums.
db -
I'm new to mac. Just started out. Have OS 10.8.3. I have an HP 1315 printer. It prints and copies, wont scan. I see old threads on this, nothing recent. ?can i make this work, or do i need a new printer??
Hi Newbie111
I see that you are unable to scan with the Photosmart 1315.
What driver are you using?
The driver listed in the url below is a basic print driver that will allow you to print only.
http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ps242muc&c c=us&dlc=en&lc=en&os=1006&product=61956&sw_lang=
You can try using the apple drivers in the url below.
http://support.apple.com/kb/DL907
If you have any further issues please let me know. -
I have an iPod Touch 5th Generation with iOS 8.1, my home button is broken and I've been using AssistiveTouch for months now. Today I just locked my iPod and it wouldn't unlock again, it doesn't respond at all, it won't turn on. It was almost fully charged, so it's not the battery. I followed the steps from this thread, but I'm still getting the "USBMuxListenerCreate: No Error" message in CMD Prompt. I bought my iPod abroad and even though I do have the warranty, I've been told at the iStore that it's not valid here, so going to the store isn't really an option. Any ideas how to solve this?
Sorry, but without a working home button it is not possible to reset or restore your device. You should visit an Authorized Appel Service Provider or Apple Store to get it serviced. The warranty for an iPod is not limited to the country where it has been bought, check here: one-year limited warranty
Jailbraking the device will void the warranty.
You can check the warranty status by inserting the serial number on this page: https://selfsolve.apple.com/agreementWarrantyDynamic.do
A list of Authorized Apple Service Providers can be found here: iPod touch - Contact Us - Apple Support -
Where to find old thread/post and closed the thread
where to find old thread/post and closed the thread
i try to search by email id, by userid but no results display at all only new post are shownHi,
where to find old thread/post and closed the thread
i try to search by email id, by userid but no results display at all only new post are shownMake sure that u have specified the Correct date range parameter as required.
Regards,
X A H E E R -
Hi guys,
I'm looking ofr my old thread in this forum unfortunatelly i cant find my old post. it display only the last 60 days that i have posted. any idea guys. thanks.Hi,
As mentioned, this is completely by design (I don't get it either).
I've started a thread in the Suggestions forum requesting that this be returned to us, you may want to add your voice there as well:
http://social.technet.microsoft.com/Forums/en-US/597b4a9d-1ca8-49be-9aac-dbaf0419bafc/my-threads-add-the-option-to-show-over-60-days?forum=suggest
Don't retire TechNet! -
(Don't give up yet - 12,575+ strong and growing) -
Old threads from last years appear in the iPad forum
When viewing the iPad forum on the iPad old threads from last year populate the threads listings. I used different browsers on the iPad besides Safari (both logged in and out) and it still happens. I haven't tried using Safari on OSX . Can someone please check this out using the iPad and OSX to see if they are experiencing the same thing. This started happening yesterday...
+Watch the movie CATCH 22 for the definition of what normal means... there isn't any.+
I will try to find it; your comment made me curious enough to google and now I know why no one has ever referred to me as being "normal".....
+Definitions of normal on the Web:+
+* conforming with or constituting a norm or standard or level or type or social norm; not abnormal; "serve wine at normal room temperature"; "normal diplomatic relations"; "normal working hours"; "normal word order"; "normal curiosity"; "the normal course of events"+
+* in accordance with scientific laws+
+* +*being approximately average or within certain limits in e.g. intelligence and development;*+ "a perfectly normal child"; "of normal intelligence"; "the most normal person I've ever met"+
+* convention: something regarded as a normative example; "the convention of not naming the main character"; "violence is the rule not the exception"; "his formula for impressing visitors"+
+* forming a right angle+ -
I have read the thread about turning off dialpad sounds when calling a number. I used to always be able to do this on my 4S but not so since the latest software on the 5. Keyboard clicks are turned off and still have dialpad sound. I've NEVER had to mute to dial before.
I really do not think it is the iPad or your network connection. Other users have reported this very same issue. Try this and see if it works for you - it may not work - but it's easy to try - harmless - and it has worked in the past for others.
Try signing out of your account and restart your iPad.
Go to Settings>Store>Apple ID and tap the ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button. Go back to Settings>Store> Apple ID and sign in again. -
I know there has been threads about this, "DELETE POST"
I know there has been threads about this, but I want to be able to delete one of my posts.
Rascal,
There are a number of reasons that members cannot delete their own posts.
One being that it could cause some confusion when reading a thread.
Say an OP starts a topic, and other members respond to that topic. Then the OP deletes the original post. Readers would not know what the replies are addressing.
You have about 15 minutes to edit the content of a post, but you cannot eliminate it entirely.
ali b -
Hello,
I've realized my old threads are not showing only seeing upto 60days. how can i get my old threads? is there a way of exporting them?
Meshack+Watch the movie CATCH 22 for the definition of what normal means... there isn't any.+
I will try to find it; your comment made me curious enough to google and now I know why no one has ever referred to me as being "normal".....
+Definitions of normal on the Web:+
+* conforming with or constituting a norm or standard or level or type or social norm; not abnormal; "serve wine at normal room temperature"; "normal diplomatic relations"; "normal working hours"; "normal word order"; "normal curiosity"; "the normal course of events"+
+* in accordance with scientific laws+
+* +*being approximately average or within certain limits in e.g. intelligence and development;*+ "a perfectly normal child"; "of normal intelligence"; "the most normal person I've ever met"+
+* convention: something regarded as a normative example; "the convention of not naming the main character"; "violence is the rule not the exception"; "his formula for impressing visitors"+
+* forming a right angle+ -
Links from old threads are not parsing in new "Communities" Forum - Fail!
As much as I am yet to be impressed with the new Communities look and feel this is functional aspect which need to be patched by Apple, and fast.
Old threads used the [Anchor text | uri link] syntax to define hyperlinked text. The new Communittees site is not parsing it correctly so old threads are full of this syntax in plain text — NOT PARSED to create links.
Everybody in QA and beta testing on this Forum Site at Apple needs a rocket under there ares for this very basic miss.(presumably it was made at Apple although I know RADAR is outside-ware)[text | uri ] not parsed:
https://discussions.apple.com/message/13304539#13304539
Ridiculous cascade threading because of massive changes to the style of boards. Column's of text in this thread are now down to as little as 3 char wide:
https://discussions.apple.com/message/13333695#13333695
Apple this really *****. Totally apart from the look and feel of Communities which I'm reserving judgement on until I give a fair trial (but so far that ***** even more than the parsing junk). Why everything except the box I'm typing in has to be oversized to Duplo scale (are kindergarten kids using Communities already?) semi-bold font-face I can't guess.
Maybe you are looking for
-
using an Infobus Form developed with JDeveloper 2.0 I get a runtime error "DAC-105 ImmediateAccess: SetAttribute failed" on two columns of the RowSet. When I include a setUpdateable(true)line for the column the result is a runtime error "JBO-03110 Ca
-
I am using a Canon 8800 to scan my photos. However, when I go to save them, they show on MP navigator as 1 saved item but saves it twice in the file. It saves them over and over after that.I tried giving each photo a new file name and changed the for
-
Re-ATP changes already saved ATP delivery dates in a sales order
Hi, I have a order where ATP has run and given a ATP date of say 10.01.2008, in the stock requirement list , Tab T, a temporary assignment is made against this with purchase order stock which is due on 10.01.2008. However when you go the sales order
-
Customizing message for 500 Internal Server Error
Hi, I want to customize the error message for 500 Internal Server Error. I added the following code in the web.xml file -<error-page> <error-code>500<error-code> <location>/Error_Pages/500.html</location>
-
Hi Experts, Is there any function module to find time difference between two given time. Thanks RR