LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 11:43 AM   #1
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Rep: Reputation: 78
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, 11:55 AM   #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, 12:14 PM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

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

Last edited by H_TeXMeX_H; 06-27-2007 at 12:15 PM.
 
Old 06-27-2007, 12: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, 12:30 PM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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, 12:48 PM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
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, 02:32 PM   #7
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
It works fine for me - Slack11, FF2.0.0.4, Adobe Reader 7 w/ FF plugin.
 
Old 06-27-2007, 02: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, 03:20 PM   #9
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,157

Rep: Reputation: 237Reputation: 237Reputation: 237
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, 03:27 PM   #10
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
It loaded for me after waiting. Same cpu usage issue.
 
Old 06-27-2007, 03: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, 05: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, 02:15 AM   #13
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Original Poster
Rep: Reputation: 78
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, 12: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, 12:34 PM   #15
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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 02:23 PM
How to access physical memory in C? cyu021 Programming 6 03-27-2005 04:16 AM
get Physical memory in C/C++ Dreampainter Programming 1 10-30-2004 08:54 PM
Physical memory usage piglingz Linux - Hardware 3 04-06-2003 09:07 PM
How Much Physical Memory ? tied2 Linux - Newbie 3 06-17-2002 01:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:46 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration