LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-27-2007, 12:43 PM   #1
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 13.37, 14.0
Posts: 396

Rep: Reputation: 49
my physical memory just get full


There is something I want to know about c++. I know about a good link http://www.uow.edu.au/~nabg/ABC/C20.pdf

but if I open that pdf - my PCs (three of them) get out of physical memory and cpu time.

Is that caused by some kind of virus. I have no idea. Pleas try somebody open that pdf on slackware (10.2).
It is necessary to have antivirus on slacke? if so which one?
 
Old 06-27-2007, 12:55 PM   #2
Carpo
Member
 
Registered: Aug 2003
Location: Somewhere
Distribution: Gentoo (for now)
Posts: 364

Rep: Reputation: 30
you could give f-prot a try - its free for linux home users - anotheer thing you could try is the adobe reder (i know i know) and see if you still get the same issues
 
Old 06-27-2007, 01:14 PM   #3
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
It seems that page 3 is a problem ... lemme see ...

Last edited by H_TeXMeX_H; 06-27-2007 at 01:15 PM.
 
Old 06-27-2007, 01:20 PM   #4
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Just for comparison, I have no problems viewing it here at work with a Windows XP box, and it uses around 50MB of RAM according to Windows Task Manager.

It might be worth saving it, converting it to postscript (pdf2ps the_file.pdf that_file.ps) and then back to pdf (ps2pdf that_file.ps that_new_file.pdf), and if there's some sort of problem with the pdf itself, that will probably wipe it out.
 
Old 06-27-2007, 01:30 PM   #5
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
I've been able to use pdftk (site is down at the moment )to split it into pages, and most pages work, but some are corrupted ... and un-fixable.

Using pdftops, incredibly does NOT help , now gv uses up 100% CPU usage.
 
Old 06-27-2007, 01:48 PM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,211

Rep: Reputation: 293Reputation: 293Reputation: 293
When I open it with kpdf only a few pages are readable. Same if I download it.

It's not really necesary to have an anti-virus in linux at all unless you are sending downloaded files or email attachments to a windows box.
 
Old 06-27-2007, 03:32 PM   #7
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
It works fine for me - Slack11, FF2.0.0.4, Adobe Reader 7 w/ FF plugin.
 
Old 06-27-2007, 03:35 PM   #8
pdw_hu
Member
 
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346

Rep: Reputation: Disabled
It might be just an ugly error in the .pdf which makes most readers leak memory.
 
Old 06-27-2007, 04:20 PM   #9
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
I looked at the first five pages, the ones with figures take quite a while to load (but my memory usage didn't go up really). I used xpdf on Slack 11.0 btw..
 
Old 06-27-2007, 04:27 PM   #10
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,211

Rep: Reputation: 293Reputation: 293Reputation: 293
It loaded for me after waiting. Same cpu usage issue.
 
Old 06-27-2007, 04:48 PM   #11
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
kpdf sucked back then. use xpdf , acroread or upgrade to 11.0 (or wait for 12.0 )

what exactly do you want to know about c++ ?
 
Old 06-27-2007, 06:35 PM   #12
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
I downloaded the pdf and ran pdf2ps on it, and got loads of this sort of error:
Code:
   **** Warning: Fonts with Subtype = /TrueType should be embedded.
                 But TimesNewRomanPSMT is not embedded.
What I think is pretty funny is the next bit it spat out:
Code:
   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> Acrobat Distiller 7.0 (Windows) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.
I then turned the postscript that produced, back into a pdf, but as H_TeXMeX_H noted, there's something very odd going on on page 3. Perhaps you could email the people who host the file and let them know?
 
Old 06-28-2007, 03:15 AM   #13
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 13.37, 14.0
Posts: 396

Original Poster
Rep: Reputation: 49
to erklaerbaer

Quote:
"What you want exactly know about c++"
I am working on a code where I want to fork more processes which will all make its own role in the program.

Code:
int kill;
int processStatus1;

int main()

 int child1, child2, child3 ...
 
 child1 = fork();... calls the refresh function for example...
 child2 = fork();... calls the virtualSpace function ...
 and so on...

 kill =1;
the functions should run in the same time and if the kill state is received all should make their end processes and the whole program terminate...

I was trying define some global variables (kill, processStatus1) but even if I declare in the main -> kill =1; the childs dose note see this state value.
Here comes the above site I thought that I can do that with pointers (the chapter on this pdf is about pointers).
I was wrong. Can you help me to solve my problem?
 
Old 06-28-2007, 01:29 PM   #14
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
uh, don't they teach you programming in school?

anyway i think i can give you some pointers:
- man 2 fork !!
- are you sure that you even need different processes? what about objects?
- ever heard of exceptions?
- don't use int for statuses. either use a more descriptive name and use bool or use your own datatype
- use an array or even better a vector for the childs
- global variables are the square root of evil and should be avoided (unless needed)
- man 2 exit_group?
 
Old 06-28-2007, 01:34 PM   #15
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
I know a good way to know when you need a global variable. First make it local, then after you finish the program (or once you realize the following), if you tend to pass a certain variable to a lot of functions (like the majority of them), then it should be global. You might also want to consider 'static' global.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Less physical memory? ariek Debian 5 07-21-2005 03:23 PM
How to access physical memory in C? cyu021 Programming 6 03-27-2005 05:16 AM
get Physical memory in C/C++ Dreampainter Programming 1 10-30-2004 09:54 PM
Physical memory usage piglingz Linux - Hardware 3 04-06-2003 10:07 PM
How Much Physical Memory ? tied2 Linux - Newbie 3 06-17-2002 02:30 AM


All times are GMT -5. The time now is 06:34 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration