468,457 Members | 1,614 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,457 developers. It's quick & easy.

purge like utility in c

hi .. can we design a program in c which will point out the possible
memory leaks in any given c file and fix them.... i am trying to come
with something like this but do not know where to start...

any help on where to begin would be highly appriciated
kind regards
rahul

Oct 10 '06
118 3823
Mark McIntyre <ma**********@spamcop.netwrites:
On Thu, 12 Oct 2006 17:41:30 +0100, in comp.lang.c , Tak-Shing Chan
<t.****@gold.ac.ukwrote:
> You have to take into account that English is not my first
language.

This defebce would only work if you had a poor grasp of english, or
were posting from China. You don't and you aren't - not unless SE
London has mysteriously moved continents.
[...]

Mark, since Usenet is asynchronous, you might not be aware that
apologies have already been offered and accepted, and this whole
subthread can be safely dropped.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Oct 12 '06 #101
Tak-Shing Chan <t.****@gold.ac.ukwrites:
I am fully aware of the musical meaning (in fact I wrote to
Richard Heathfield above: ```slurs' does have a different meaning
in a musical context''); however, when ``slur'' is preceded by
``generic'', the musical meaning ceases to apply. Try searching
for +"generic slur" +music on Google. Ask your musical friends
for independent verification(s), preferably, both music theorists
and performers.
I am a music theorist and performer, and I *really* *wish* you'd stop
beating a dead horse. My appropriately credentialled opinion on the
topic is that "generic slurs" can be interpreted either way even in a
musical context, and you are choosing to interpret a pun made by Mr
Heathfield -- a play on words, a joke -- in the worst possible light.

If you don't have something to say about standard C, please post in a
different group.

Charlton

Oct 12 '06 #102
On Thu, 12 Oct 2006, Charlton Wilbur wrote:
Tak-Shing Chan <t.****@gold.ac.ukwrites:
> I am fully aware of the musical meaning (in fact I wrote to
Richard Heathfield above: ```slurs' does have a different meaning
in a musical context''); however, when ``slur'' is preceded by
``generic'', the musical meaning ceases to apply. Try searching
for +"generic slur" +music on Google. Ask your musical friends
for independent verification(s), preferably, both music theorists
and performers.

I am a music theorist and performer, and I *really* *wish* you'd stop
beating a dead horse. My appropriately credentialled opinion on the
topic is that "generic slurs" can be interpreted either way even in a
musical context, and you are choosing to interpret a pun made by Mr
Heathfield -- a play on words, a joke -- in the worst possible light.

If you don't have something to say about standard C, please post in a
different group.
[Thread marked OT.]

I have already apologised for inappropriately prolonging
this thread; but there is one thing above that is unclear to me
and I would be grateful if you could kindly provide one citation,
just one, in any peer-reviewed academic periodicals, in theory or
in performance, that mentions ``generic slurs'' in a musical
context. As I have found out on Music Index Online, there exist
no matching titles or subjects containing ``generic slurs'' or
``generic slur'' from their 775+ periodicals (1976--2006)
database. I must have missed something here.

Then there is this Google evidence. I searched for
+"generic slurs" +music, with 9 results in all, none of them have
musical meanings; +"generic slur" +music, 15 hits, not a single
one is in a musical sense; and finally, Google Scholar,
+"generic slur" +music, 2 hits, nothing musical; and
+"generic slurs" +music, not even a single hit. I must have
missed something here.

Tak-Shing
Oct 12 '06 #103
In article <Pi*******************************@scorpio.gold.ac .uk>,
Tak-Shing Chan <t.****@gold.ac.ukwrote:
I have already apologised for inappropriately prolonging
this thread; but there is one thing above that is unclear to me
and I would be grateful if you could kindly provide one citation,
just one, in any peer-reviewed academic periodicals, in theory or
in performance, that mentions ``generic slurs'' in a musical
context.
You probably won't find any, because "generic slur" is not any kind of
standard term, it's just two words put together - a slur that is
generic. A slur is a sequence of notes run together, so you can have
a fast slur, a joyful slur, a ridiculous slur, a unique slur,
any-adjective-you-like slur. The fact that no-one happens to have
used that pair of words together just means that people don't often
consider whether musical slurs are generic or not. Not to mention the
fact that the word "generic" is probably far more familiar to computer
programmers than the general public - I doubt you'd find many
musicians who'd use the phrase "generic slur" with the other sense of
slur.

-- Richard
Oct 13 '06 #104
Tak-Shing Chan wrote:
On Thu, 12 Oct 2006, Chris Dollin wrote:
>Tak-Shing Chan wrote:
>>On Thu, 12 Oct 2006, Chris Dollin wrote:

Frederick Gotham wrote:

I'm the _inventor_ of Usenet, of course I'm in such a position!

Hell's teeth, what kind of egomaniac are you to claim that you invented
Usenet? Three minutes with Google is enough to refute it. Bah.

I think Frederick is trying to demonstrate his point that
without smiley or the like it is very easy to misinterpret the
``I'm the __inventor__ of Usenet'' joke.

In that case he failed: it was obvious that he was joking, which is
why I responded as I did - using the same signalling technique to
show that it was humour.

I failed to catch your signal---it was somehow lost in
translation. But I did catch Frederick's, because he used
underscores to mark the false bits.
I don't think so: I think it's coincidence that his emphasis-
marker was on the false-to-fact word. It's over-statement that
I saw as the signal. (And my response /is/ over-statement,
compared to my typical text in this newsgroup.)

--
Chris "Essen -6 and counting" Dollin
"The path to the web becomes deeper and wider" - October Project

Oct 13 '06 #105
On Fri, 13 Oct 2006, Chris Dollin wrote:
Tak-Shing Chan wrote:
>On Thu, 12 Oct 2006, Chris Dollin wrote:
>>Tak-Shing Chan wrote:

On Thu, 12 Oct 2006, Chris Dollin wrote:

Frederick Gotham wrote:
>
>I'm the _inventor_ of Usenet, of course I'm in such a position!
>
Hell's teeth, what kind of egomaniac are you to claim that you invented
Usenet? Three minutes with Google is enough to refute it. Bah.

I think Frederick is trying to demonstrate his point that
without smiley or the like it is very easy to misinterpret the
``I'm the __inventor__ of Usenet'' joke.

In that case he failed: it was obvious that he was joking, which is
why I responded as I did - using the same signalling technique to
show that it was humour.

I failed to catch your signal---it was somehow lost in
translation. But I did catch Frederick's, because he used
underscores to mark the false bits.

I don't think so: I think it's coincidence that his emphasis-
marker was on the false-to-fact word. It's over-statement that
I saw as the signal. (And my response /is/ over-statement,
compared to my typical text in this newsgroup.)
Well, Dan Pop routinely overstates (w.r.t. people's
intellect). Does that mean he was very humourous?

Tak-Shing
Oct 13 '06 #106
Tak-Shing Chan wrote:
On Fri, 13 Oct 2006, Chris Dollin wrote:
>Tak-Shing Chan wrote:
>>On Thu, 12 Oct 2006, Chris Dollin wrote:

Tak-Shing Chan wrote:

On Thu, 12 Oct 2006, Chris Dollin wrote:
>
>Frederick Gotham wrote:
>>
>>I'm the _inventor_ of Usenet, of course I'm in such a position!
>>
>Hell's teeth, what kind of egomaniac are you to claim that you invented
>Usenet? Three minutes with Google is enough to refute it. Bah.
>
I think Frederick is trying to demonstrate his point that
without smiley or the like it is very easy to misinterpret the
``I'm the __inventor__ of Usenet'' joke.

In that case he failed: it was obvious that he was joking, which is
why I responded as I did - using the same signalling technique to
show that it was humour.

I failed to catch your signal---it was somehow lost in
translation. But I did catch Frederick's, because he used
underscores to mark the false bits.

I don't think so: I think it's coincidence that his emphasis-
marker was on the false-to-fact word. It's over-statement that
I saw as the signal. (And my response /is/ over-statement,
compared to my typical text in this newsgroup.)

Well, Dan Pop routinely overstates (w.r.t. people's
intellect). Does that mean he was very humourous?
No, of course not, and I think you know perfectly well why.
If you wish to continue this off-topic discussion, then
I suggest brief email, with the caveat that I'm on holiday
from late this afternoon.

--
Chris "Essen -6 and counting" Dollin
"Our future looks secure, but it's all out of our hands"
- Magenta, /Man and Machine/

Oct 13 '06 #107
Tak-Shing Chan <t.****@gold.ac.ukwrites:
On Fri, 13 Oct 2006, Chris Dollin wrote:
>Tak-Shing Chan wrote:
>>On Thu, 12 Oct 2006, Chris Dollin wrote:

Tak-Shing Chan wrote:

On Thu, 12 Oct 2006, Chris Dollin wrote:
>
>Frederick Gotham wrote:
>>
>>I'm the _inventor_ of Usenet, of course I'm in such a position!
>>
>Hell's teeth, what kind of egomaniac are you to claim that you invented
>Usenet? Three minutes with Google is enough to refute it. Bah.
>
I think Frederick is trying to demonstrate his point that
without smiley or the like it is very easy to misinterpret the
``I'm the __inventor__ of Usenet'' joke.

In that case he failed: it was obvious that he was joking, which is
why I responded as I did - using the same signalling technique to
show that it was humour.

I failed to catch your signal---it was somehow lost in
translation. But I did catch Frederick's, because he used
underscores to mark the false bits.

I don't think so: I think it's coincidence that his emphasis-
marker was on the false-to-fact word. It's over-statement that
I saw as the signal. (And my response /is/ over-statement,
compared to my typical text in this newsgroup.)

Well, Dan Pop routinely overstates (w.r.t. people's
intellect). Does that mean he was very humourous?
Humor lessons are next door. This is being-hit-on-the-head lessons.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Oct 13 '06 #108
On Fri, 13 Oct 2006, Richard Tobin wrote:
In article <Pi*******************************@scorpio.gold.ac .uk>,
Tak-Shing Chan <t.****@gold.ac.ukwrote:
> I have already apologised for inappropriately prolonging
this thread; but there is one thing above that is unclear to me
and I would be grateful if you could kindly provide one citation,
just one, in any peer-reviewed academic periodicals, in theory or
in performance, that mentions ``generic slurs'' in a musical
context.

You probably won't find any, because "generic slur" is not any kind of
standard term, it's just two words put together - a slur that is
generic. A slur is a sequence of notes run together, so you can have
a fast slur, a joyful slur, a ridiculous slur, a unique slur,
any-adjective-you-like slur. The fact that no-one happens to have
used that pair of words together just means that people don't often
consider whether musical slurs are generic or not. Not to mention the
fact that the word "generic" is probably far more familiar to computer
programmers than the general public - I doubt you'd find many
musicians who'd use the phrase "generic slur" with the other sense of
slur.
The adjective ``generic'' would only be meaningful if there
exists a group or class of specialised, non-generic slurs. Do
they exist in a musical context?

[No, I consider slurs, ties and phrase marks as separate
entities because they have different semantics.]

Tak-Shing
Oct 13 '06 #109
EKB

ra*******************@gmail.com wrote:
hi .. can we design a program in c which will point out the possible
memory leaks in any given c file and fix them.... i am trying to come
with something like this but do not know where to start...

any help on where to begin would be highly appriciated
kind regards
rahul
Hi,

I like to use Walter Bright's "MEM" package, available from the
Snippets archive:

http://c.snippets.org/browser.php

Search for "Bright" on the page.
>From the package description:
"MEM is a set of functions used for debugging C pointers and memory
allocation
problems. Quoting Walter, "Symptoms of pointer bugs include: hung
machines,
scrambled disks, failures that occur once-in-10,000 iterations,
irreprodu-
cible results, and male pattern baldness." After writing MEM for use in
developing his own compiler and tools, he reported that its use reduced
pointer bugs by as much as 75%. MEM is simple to add to existing
programs
and adds little or no overhead."

I've found that to be true: it's easy to add, and I quickly tracked
down a memory leak that had been plaguing me.

Eric

Oct 13 '06 #110
In article <Pi******************************@scorpio.gold.ac. uk>,
Tak-Shing Chan <t.****@gold.ac.ukwrote:
The adjective ``generic'' would only be meaningful if there
exists a group or class of specialised, non-generic slurs. Do
they exist in a musical context?
No idea. But humour doesn't have to be factually accurate. Music
*could* have generic slurs, even if it doesn't.

-- Richard
Oct 13 '06 #111
ri*****@cogsci.ed.ac.uk (Richard Tobin) writes:
No idea. But humour doesn't have to be factually accurate. Music
*could* have generic slurs, even if it doesn't.
The argument is that the concept of "generic slur" is so meaningless
in music that that phrase will be *inherently* interpreted in the same
sense as "ethnic slur." This is a little bit beyond "factually
accurate," well into the realms of the unprovable, and Mr Chan should
be admonished (preferably *before* he begins his full-text searching)
that absence of evidence is not the same as evidence of absence.

In short: the fact that "generic slur" is not a commonly-used term of
art does not mean that the concept of a generic slur has no relevance
to music theory or performance.

Charlton


Oct 13 '06 #112
On Fri, 13 Oct 2006, Charlton Wilbur wrote:
ri*****@cogsci.ed.ac.uk (Richard Tobin) writes:
>No idea. But humour doesn't have to be factually accurate. Music
*could* have generic slurs, even if it doesn't.

The argument is that the concept of "generic slur" is so meaningless
in music that that phrase will be *inherently* interpreted in the same
sense as "ethnic slur." This is a little bit beyond "factually
accurate," well into the realms of the unprovable, and Mr Chan should
be admonished (preferably *before* he begins his full-text searching)
that absence of evidence is not the same as evidence of absence.
It is true that my argument relies on an absence of evidence
and therefore is philosophically unsound, but as you said it is
``into the realms of the unprovable'', so our best bet is to
prove it beyond a reasonable doubt. Google and Music Index
Online together have provided me with enough grounds to believe
that the probability is practically zero (considering the size
and coverage of the archives, zero hits do mean something).
In short: the fact that "generic slur" is not a commonly-used term of
art does not mean that the concept of a generic slur has no relevance
to music theory or performance.
Your phrase, ``/the/ concept of a generic slur'' [emphasis
mine], implies that there exists one unambiguous definition of
the said concept. Can you provide such a definition, in a way
that is acceptable to all your fellow theorists?

Secondly, the adjective ``generic'' before ``slur'' implies
that there exists a group or class of specialised slurs from
which you can blend their main characteristics together and call
it a ``generic slur''. I am not aware of the existence of such.
A possible counterargument is to cite Grove, which says that
there exists tie slurs, phrasing slurs, glissando slurs, vertical
slurs, etc. But this glosses over the fact that such slurs do
not belong to the same ``group or class'', as you cannot put a
tie in the place of a chord slur and hope that it would still
work, for example. If generic slur indeed exists, I would expect
it to be ``write once use everywhere''. So, I am not convinced
that generic slurs are possible in a musical context.

Tak-Shing
Oct 13 '06 #113
Tak-Shing Chan posted:
The adjective ``generic'' would only be meaningful if there
exists a group or class of specialised, non-generic slurs.

You're making the presumption that the function of adjectives is to
distinguish one thing from another. They can also be used to simply describe
something! I can say, "That's a generic slur.", without implying that there
are non-generic slurs in existance. Even if there are no non-generic slurs in
existance, my use of "generic" is not redudant as I'm using it to express my
view.

Also, remember the term, "bull-headed Irishman"; it was argued that the use
of "bull-headed" implied that there was a such thing as a "non-bullheaded"
Irishman -- and it was argued that therefore, if the person were implying
that _all_ Irishmen were bull-headed, that the descriptive term, "bull-
headed", would be redundant in that context. One could easily argue against
this though, in saying that the speaker was expressing a stereotypical view
of Irishmen via use of the descriptive term, "bull-headed".
Alas, one can use a descriptive term (be it an adjective, noun, whatever)
for a wide variety of reasons -- more reasons than a grammar book can tell
you.

--

Frederick Gotham
Oct 13 '06 #114
On Thu, 12 Oct 2006 22:27:54 GMT, in comp.lang.c , Keith Thompson
<ks***@mib.orgwrote:
>Mark McIntyre <ma**********@spamcop.netwrites:
>On Thu, 12 Oct 2006 17:41:30 +0100, in comp.lang.c , Tak-Shing Chan
<t.****@gold.ac.ukwrote:
>> You have to take into account that English is not my first
language.

This defebce would only work if you had a poor grasp of english, or
were posting from China. You don't and you aren't - not unless SE
London has mysteriously moved continents.
[...]

Mark, since Usenet is asynchronous, you might not be aware that
apologies have already been offered and accepted, and this whole
subthread can be safely dropped.
*whew*
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Oct 13 '06 #115
On Fri, 13 Oct 2006, Frederick Gotham wrote:
Tak-Shing Chan posted:
> The adjective ``generic'' would only be meaningful if there
exists a group or class of specialised, non-generic slurs.


You're making the presumption that the function of adjectives is to
distinguish one thing from another. They can also be used to simply describe
something! I can say, "That's a generic slur.", without implying that there
are non-generic slurs in existance. Even if there are no non-generic slurs in
existance, my use of "generic" is not redudant as I'm using it to express my
view.
No. I was not talking about the function of ``adjectives'',
but rather the meaning of ``generic''.

Tak-Shing
Oct 16 '06 #116
On Fri, 13 Oct 2006 09:30:01 +0100, Tak-Shing Chan <t.****@gold.ac.uk>
wrote:
>On Fri, 13 Oct 2006, Richard Tobin wrote:
>>
You probably won't find any, because "generic slur" is not any kind of
standard term, it's just two words put together - a slur that is
generic. A slur is a sequence of notes run together, so you can have
a fast slur, a joyful slur, a ridiculous slur, a unique slur,
any-adjective-you-like slur. The fact that no-one happens to have
used that pair of words together just means that people don't often
consider whether musical slurs are generic or not. Not to mention the
fact that the word "generic" is probably far more familiar to computer
programmers than the general public - I doubt you'd find many
musicians who'd use the phrase "generic slur" with the other sense of
slur.

The adjective ``generic'' would only be meaningful if there
exists a group or class of specialised, non-generic slurs. Do
they exist in a musical context?
To this non-musician, it seems that Richard just named four members of
that group :-)

--
Al Balmer
Sun City, AZ
Oct 16 '06 #117
On Fri, 13 Oct 2006 20:41:27 +0100, Tak-Shing Chan <t.****@gold.ac.uk>
wrote:
>A possible counterargument is to cite Grove, which says that
there exists tie slurs, phrasing slurs, glissando slurs, vertical
slurs, etc. But this glosses over the fact that such slurs do
not belong to the same ``group or class'
They (obviously) all belong to the group of slurs. Not to mention the
group of specific slurs.

--
Al Balmer
Sun City, AZ
Oct 16 '06 #118
On Wed, 11 Oct 2006 06:20:50 +0000, Richard Heathfield
<in*****@invalid.invalidwrote:
Keith Thompson said:
<snip>
Ignoring jacob navia needn't imply ignoring GC.
Concur.
He makes a poor advertisement for it. If this is what garbage collection
leaves behind...
<ObVaguelyNearTopicBut as long as you, and (quite a few) others,
keep replying to him, he's NOT unreferenced and hence not collectable.

- David.Thompson1 at worldnet.att.net
Oct 23 '06 #119

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Dan Caron | last post: by
1 post views Thread by Heather | last post: by
5 posts views Thread by Diffident | last post: by
1 post views Thread by huyuhui | last post: by
27 posts views Thread by Neil | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.