You are not logged in. Please login at www.codechef.com to post your questions!

×

Memory management in c++/Java

Hi All!

I have a doubt. For example if a question specifies memory limit of 50000 Bytes then shouldn't this figure vary for different languages. Languages like c++ and c takes much less memory than Java, didn't they?

Kindly correct me in case I am missing something. Thanks!

asked 07 Apr '15, 00:32

kart_gupta's gravatar image

3★kart_gupta
11
accept rate: 0%


50000 bytes is the source limit, i.e. the maximum size of your source code. The maximum memory available at runtime is 1536 MB as described here. These numbers are the same for all the languages.

You are right, that the memory consumption depends on the language you use, but 1536 MB is more than enough for most of the problems and languages (if not for all of them). If you hit this limit, you should consider using a better data structure and/or a better algorithm.

link

answered 07 Apr '15, 03:42

pavel's gravatar image

6★pavel
1
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,917
×1,313
×20

question asked: 07 Apr '15, 00:32

question was seen: 1,008 times

last updated: 07 Apr '15, 03:42