LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-16-2006, 12:57 PM   #1
ablanchard
LQ Newbie
 
Registered: Dec 2004
Posts: 9

Rep: Reputation: 0
Question kernel.task_size question


Hi,

On RedHat Linux psy.dgeq.qc.ca 2.4.21-15.ELsmp #1 SMP Thu Apr 22 00:18:24 EDT 2004 i686 i686 i386 GNU/Linux
the kernel.task_size is -1073741824.

Does anybody know why it's negatif (-).

André
 
Old 06-16-2006, 01:03 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,493
Blog Entries: 15

Rep: Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463
Couldn't find an answer on that one.

Often you'll see negative numbers when you get a number so large that it overflows the defined field. When that occurs it changes the sign bit. It also means the number you're seeing may not the correct one because it couldn't see all the bits. You can see this happen if you use the "expr" command to add very large numbers.

Not sure if that's the case here but did run across posts listing the parameter with a hexadecimal rather than decimal number. That hex value equated to the unsigned decimal value you're seeing so I suspect this is the case. I have seen this on other *nixes (HP-UX for example - sometimes you have to put in values in hex because the field is not large enough to take it in decimal).

On both my Debian (PA-RISC) and RedHat AS 3 (Intel) I have the same value as you.
 
Old 07-03-2006, 07:54 AM   #3
ablanchard
LQ Newbie
 
Registered: Dec 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Hi,

Thank for the reply.

Like you say it's not an easy info to get. I post the same question on RedHat forum and the the answer mention that it's effectively an hex number so the sign doesn't matter.

Have a nice day.

André
 
Old 07-03-2006, 01:15 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,493
Blog Entries: 15

Rep: Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463
The negative number you listed is decimal. You can conver it to hexadecimal by using the "bc" command:

Example:
bc -l

bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.

obase=16
-1073741824
-40000000


In the above I started bc (-l tells it not to round - not really important for this calc but I always set it so I don't forget). I then told it to set the output base (obase) to hexadecimal (base 16). The default ibase (input base) and obase is decimal (base 10). So by putting in the decimal number and hitting return it shows me the hexadecimal equivalent. Note this DOES have negation as well.

To exit bc when done hold down the Ctrl key and hit d (Ctrl-D = Exit).

Usually hex numbers are expressed with 0x preceding them to let you know so 0x40000000 is the result you got.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel question: difference between Patch and "regular" kernel source kopikat Linux - Software 1 01-26-2005 05:24 PM
Broad question: Is kernel 2.6.9 really stable? What is the best 2.6.x kernel? jtp51 Slackware 16 10-27-2004 12:29 PM
Kernel question (about kernel patches) alekoos Linux - Newbie 1 04-29-2004 11:33 AM
2.6.x kernel question spyder Slackware 4 04-08-2004 09:44 AM
Lilo/kernel question & font question phek Linux - General 9 09-18-2001 12:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:03 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration