mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: David Howells <dhowells@redhat.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: fork pagesize patch
Date: Tue, 16 Nov 2004 08:02:44 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0411160800060.2222@ppc970.osdl.org> (raw)
In-Reply-To: <20968.1100619491@redhat.com>



On Tue, 16 Nov 2004, David Howells wrote:
> 
> You seem to have turned:

No, Andrew probably did.

> 
> 	+#if THREAD_SIZE >= PAGE_SIZE
> 		max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 8;
> 	+#else
> 	+	max_threads = mempages / 8;
> 	+#endif
> 	+
> 
> Into:
> 
> 	if (THREAD_SIZE >= PAGE_SIZE)
> 		max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 8;
> 	else
> 		max_threads = mempages / 8;
> 
> Please don't do that. What you've done causes a divide-by-zero error to be
> emitted by the compiler if PAGE_SIZE > THREAD_SIZE. That's why I used the
> preprocessor in the first place.

What kind of broken compiler are _you_ using? Fix your compiler.

If THREAD_SIZE is smaller than PAGE_SIZE, then the compiler IS NOT ALLOWED 
to do the divide-by-zero. Your compiler is so incredibly broken that this 
is not even worth fixing. Complain to the gcc guys.

		Linus

  reply	other threads:[~2004-11-16 16:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-16 15:38 David Howells
2004-11-16 16:02 ` Linus Torvalds [this message]
2004-11-16 16:11 ` David Howells
2004-11-16 16:40   ` Linus Torvalds
2004-11-16 16:58   ` David Howells
2004-11-16 17:11     ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0411160800060.2222@ppc970.osdl.org \
    --to=torvalds@osdl.org \
    --cc=akpm@osdl.org \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®