{"id":5667,"date":"2014-04-04T18:47:05","date_gmt":"2014-04-04T18:47:05","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/04\/linuxddosmemoryvirtual-memoryrelated-issues-collection-of-common-programming-errors\/"},"modified":"2014-04-04T18:47:05","modified_gmt":"2014-04-04T18:47:05","slug":"linuxddosmemoryvirtual-memoryrelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/04\/linuxddosmemoryvirtual-memoryrelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"linux,ddos,memory,virtual-memoryRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e87ec3a614687ee27aee59d972a58997?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nsdaau<br \/>\nc++ c linux bash<br \/>\nSorry about the title, couldn&#8217;t really think of anything else to describe the problem :)Ok, so the thing is like this: I&#8217;m trying to use a proprietary freeware application under Linux (and hence the problem; if I had the source, I could have rebuilt it). Furthermore, I&#8217;m trying to run it on an unsupported flavor of Linux, and nearly all components of the application work individually, but not together (as they should if the application ran fully). Let me clarify a bit. There is a GUI, that start<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/Gh6QY.jpg?s=32&amp;g=1\" \/><br \/>\nVenu Murthy<br \/>\nruby linux chef<br \/>\nI am on Centos 6.5 and would like to have chef-server version 10.30.4 as here. I am using the ruby version of 1.9.3 via RVM. As on this link.and even after having installed all dependencies as on this pagelike CouchDB, RabbitMQ, Java, GEOS, zlib and libxml, setting up the GPG key and also tried the hammer method of yum groupinstall &#8220;Development Tools&#8221;but getting the following errors ongem install chef-server -v &#8220;10.30.&#8221; Note: all of these are being done as root. Error is ERROR: While exec<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a72dee6870277c3b9c0234150b3fd403?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nairbjorn<br \/>\nc linux gcc centos cross-compiling<br \/>\nI have a 32bit development machine based on CentOS6 properly configured for my needs, but now have to compile parts of my code for usage on 64bit Linux. It is about a native library (.so).With my 32bit CPU and 32bit OS, I try to compile the library for a 64bit OS environment. For getting the proper tools therefore, I installed the RPM packages x86_64-linux-gnu-gcc and binutils-x86_64-linux-gnu. Instead of gcc I&#8217;m using x86_64-linux-gnu-gcc now, but the compilation fails.Furthermore, when reading<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/47fb1c994881b927b5d2d4f7d6cacf0c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nBartek Maraszek<br \/>\nruby linux rubygems apt-get<br \/>\nI&#8217;m trying to install ruby mysql gem. After gem install mysql I get:Building native extensions. This could take a while&#8230; ERROR: Error installing mysql: ERROR: Failed to build gem native extension.\/usr\/bin\/ruby1.9.1 extconf.rb \/usr\/lib\/ruby\/1.9.1\/rubygems\/custom_require.rb:36:in `require&#8217;: cannot load such file &#8212; mkmf (LoadError) from \/usr\/lib\/ruby\/1.9.1\/rubygems\/custom_require.rb:36:in `require&#8217; from extconf.rb:5:in `&lt;main&gt;&#8217;Gem files will remain installed in \/var\/lib\/gems\/1.9.1\/gems\/m<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/62b560630b1dfc05d65256975a9b698e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nShane Hart<br \/>\nlinux fortran endianness gfortran<br \/>\nI have a rather monolothic code that reads in a large variety of data from unformatted big endian binary files. Normally the code is run from within a bash script that sets the environment variable GFORTRAN_CONVERT_UNIT=&#8217;native;big_endian:60-70,80-89&#8242; and then opens those big endian data files using one of those unit numbers. This works fine for Fedora and RHEL. However, when I&#8217;ve run the program on Debian (and derivatives including Ubuntu and Linux Mint), OpenSUSE, and Arch Linux I get the f<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a254f486ab076ab1af26162a975e90f9?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nShai<br \/>\nsql-server linux odbc segmentation-fault pyodbc<br \/>\nI have written a job server that runs 1 or more jobs concurrently (or simultaneously depending on the number of CPUs on the system). A lot of the jobs created connect to a SQL Server database, perform a query, fetch the results and write the results to a CSV file. For these types of jobs I use pyodbc and Microsoft SQL Server ODBC Driver 1.0 for Linux to connect, run the query, then disconnect.Each job runs as a separate process using the python multiprocessing module. The job server itself is ki<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/j5mpN.jpg?s=32&amp;g=1\" \/><br \/>\nThinkFloyd<br \/>\njava linux multithreading shell monitoring<br \/>\nWe had some issues of thread pile ups with production tomcat server so I wanted to setup some cron to to periodically check thread dumps and send alert email if something is wrong. To do this we need to take thread dumps in file from shell script but I am unable to do that. From shell I can issue KILL -3 &lt;PID&gt; at periodic intervals but the problem is that dump goes to catalina.out which contains GBs of data because of which pulling out only thread dump is painful process. Some discussion t<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/547d34a3d35a2de241fe186198d3b898?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nsisko<br \/>\nlinux sencha-touch-2<br \/>\nI&#8217;m trying to generate a new app using the following:root@li184-76:\/var\/www\/touch-2.3.1# sencha generate app NewApp ..\/newappHowever, I get the following:Sencha Cmd v4.0.1.4[INF] Workspace does not have framework touch at \/var\/www &#8230; copying [ERR] java.lang.NullPointerExceptionat com.sencha.util.Version.&lt;init&gt;(Version.java:36)at com.sencha.command.generator.GeneratorCommands$WorkspaceCommand.getParameters(GeneratorCommands.java:130)at com.sencha.command.BasePluginCommands$BasePluginComman<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/6LVuV.png?s=32&amp;g=1\" \/><br \/>\nHaris Hasan<br \/>\njava linux tomcat jsvc<br \/>\nI am trying to run Tomcat via jsvc as mentioned here in order to make web server more secure. I am using this command.\/bin\/jsvc \\-user tomcat \\-debug \\-classpath $CATALINA_HOME\/bin\/bootstrap.jar:$CATALINA_HOME\/bin\/tomcat-juli.jar \\-outfile $CATALINA_BASE\/logs\/catalina.out \\-errfile $CATALINA_BASE\/logs\/catalina.err \\-Dcatalina.home=$CATALINA_HOME \\-Dcatalina.base=$CATALINA_BASE \\-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \\-Djava.util.logging.config.file=$CATALINA_BASE\/conf\/<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f17075cc008a45d68ee5909fdce41690?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser386660<br \/>\nruby linux ruby-on-rails-3 winapi ubuntu<br \/>\nI am ubuntu guy and not able to install win32-api.Please find my logBuilding native extensions. This could take a while&#8230; ERROR: Error installing win32-api:ERROR: Failed to build gem native extension.\/usr\/local\/rvm\/rubies\/ruby-1.9.2-p290\/bin\/ruby extconf.rbchecking for strncpy_s()&#8230; no creating Makefilemake gcc -I. -I\/usr\/local\/rvm\/rubies\/ruby-1.9.2-p290\/include\/ruby-1.9.1\/i686-linux -I\/usr\/local\/rvm\/rubies\/ruby-1.9.2-p290\/include\/ruby-1.9.1\/ruby\/backward -I\/usr\/local\/rvm\/rubies\/ruby-1.9.2-p<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/86913beb9b7de83dfab09b8101778e92?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmumu2<br \/>\nazure nginx reverse-proxy squid ddos<br \/>\nIf we have some spherical application in vacuum hosted on Microsoft Azure, that we would like to protect against DDoS attack with minimum economic impact and maximum reliability then:Is it useful to organize reverse proxy like squid or nginx as a protection level against DDoS? If true &#8211; does it make sense to deploy reverse proxy on Azure or as dedicated server? If we deploy proxy on Azure, should\/can it be multiinstantinated and if not, won&#8217;t it become a bottleneck? If false &#8211; what measures can<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e22e9c1c7a39d48b506b02da8ea9a389?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSwaroopGiwali<br \/>\nnetwork ddos<br \/>\nDDos on a wired network has to be extremely rare, since the intruder has to be physically connected to the network. However, let&#8217;s say that it still managed to happen. How would you be able to defend against it on a LAN? I&#8217;m curious as to how this is possible. I&#8217;m interested in exploring this further in my lab tomorrow because I should have some free time.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/481707331ea4d07ae2490bb88ddfd7ca?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nScott Pack<br \/>\nproxy ddos<br \/>\nWe&#8217;re trying to protect some sites that are primarily located in Asia using distributed caching. These sites commonly come under DDOS attacks. We are using fail2ban, but still have two problems:Many users are coming from behind common firewall\/NAT configurations so they appear to have the same address. Many legitimate requests might be blocked based on request per second rules. We see moderate DDOS attacks from many different addresses, for example, 6000 addresess make a few requests over a day,<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/cbed5319b7359b8782ffc524121911cc?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nasle<br \/>\nddos<br \/>\nI got an email from Amazon that my Amazon EC2 server is being used for DDoS attacks and they have closed all ports except SSH. This is tragical for me but I have not been able to find out how and where this attack is running. I can not find anything in cron jobs. I am using ssh key-pairs to connect to the server so it is unlikely someone can have hijacked the root account. I did have FTP on the server but I changed to SFTP now. Could it be a PHP page being used for this and how do I find the sou<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0f808db64ef3e39f9ad33ca6d4c547a8?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser473752<br \/>\nip localhost ddos spoofing<br \/>\nSo here is a fun one. I&#8217;m getting bingbot requests at a certain time everyday that kill the server. Here is the request:127.0.0.1 &#8211; &#8211; [14\/Sep\/2013:08:18:49 -0500] &#8220;GET \/ HTTP\/1.1&#8221; 200 82810 &#8220;-&#8221; &#8220;Mozilla\/5.0 (compatible; bingbot\/2.0; +http:\/\/www.bing.com\/bingbot.htm)&#8221;I&#8217;m pretty sure you can&#8217;t spoof 127.0.0.1, right? And I checked the server a thousand times for any malicious code but I came up emtpy. Searched google and didn&#8217;t find much. I found many people with bingbot spoofing and sending so ma<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/Oz6wv.jpg?s=32&amp;g=1\" \/><br \/>\nShankar Damodaran<br \/>\nddos<br \/>\nOne of website has tremendous traffic with following logs.220.84.197.175 &#8211; &#8211; [10\/Nov\/2011:19:10:32 +0900] &#8220;GET \/D1103.jpg HTTP\/1.1&#8221; 404 249 &#8220;-&#8221; &#8220;Mozilla\/4.0 (Compatible; MSIE 6.0;)&#8221;111.118.8.137 &#8211; &#8211; [10\/Nov\/2011:19:10:32 +0900] &#8220;GET \/D1103.jpg HTTP\/1.1&#8221; 404 249 &#8220;-&#8221; &#8220;Mozilla\/4.0 (Compatible; MSIE 6.0;)&#8221;222.112.120.160 &#8211; &#8211; [10\/Nov\/2011:19:10:33 +0900] &#8220;GET \/D1103.jpg HTTP\/1.1&#8221; 404 249 &#8220;-&#8221; &#8220;Mozilla\/4.0 (Compatible; MSIE 6.0;)&#8221;125.181.231.132 &#8211; &#8211; [10\/Nov\/2011:19:10:33 +0900] &#8220;GET \/H516.jpg HTTP\/1.1&#8221;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e7bc3ce1dbb0fcaa9bb00bf10628526e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nKyle Macey<br \/>\njavascript ajax security ddos<br \/>\nMy site has a Javascript method that makes an AJAX request to add an item to cart without reloading the page and making a simple notification.AddToCart()However, using any Javascript console, I found you can flood this request with a simple statement:while (true) {AddToCart()}And eventually lock the server until the browser crashes. A more stable browsing environment could probably even lock the server indefinitely. So what would be the best way to protect against such an attempt?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/46b2704c26143ab9c430b4250eb28f88?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nEric Belair<br \/>\nwindows-server-2003 iis iis6 ddos coldfusion<br \/>\nWe had an interesting outage today on one of our client&#8217;s websites. Out of nowhere, the website was inaccessible. The website runs by itself on a dedicated physical Windows 2003 R2 server (probably overkill, I know, but that&#8217;s a discussion for a different day). After restarting IIS and ColdFusion Application Service, the problem came back several times. My initial thought was that it was a DNS issue, which happens occasionally &#8211; the last time it happened was after Hurricane Sandy when we our ISP<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/5e7eb64ccc7ea61ceb0c59a76d28f633?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAlexander Stopher<br \/>\nddos<br \/>\nI could probably make a better title, edit it if you find a better way of phasing my problem. Basically what&#8217;s happened is that a gameserver host thinks I keep attacking their dedicated server with a DDoS attack; but I do not.I have a theory that someone is faking their IP so it matches up with mine, and is launching attacks with it. I am worried that this is the case, and am having a hard time convincing the owner of the gameservers that it&#8217;s not me attacking his servers.How plausible is this t<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d3b98b3b16e569f236dd76f7f29de76e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nOliver<br \/>\nip timeout ddos<br \/>\nThis question already has an answer here:I am under DDoS. What can I do?1 answersomeone is making many requests to a specific page on my site that has JS on it. Subsequently, it&#8217;s driving the CPU load to 100+ if I don&#8217;t restart apache.What I tried: &#8211; Reduce KeepAlive timeout &#8211; Installed mod_evasive (doesn&#8217;t seem to work due to MaxChildProcesses, basically it&#8217;s installed and blacklisting IP&#8217;s but I can still hit refresh 20 times and it wont block anything) &#8211; Installed DDOS DEFLATE (usless, CSF i<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d99f2b85ed7d3373e304e4aa27612e7e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nLcsky<br \/>\nandroid memory bitmap native out-of-memory<br \/>\nThe phenomenon: First do allocation some big memory blocks in the Java side until we catche OutOfMemoryError, then free them all. Now, weird things happen: load even a small picture(e.g. width:200, height:200) by BitmapFactory.decodeXXX(decodeResource, decodeFile, &#8230;) will throw an OutOfMemoryError! But its OK to alloc any pure Java big Object(e.g. new byte[2*1024*1024]) now!Verifying: I wrote some simple codes to verify the problem that can download here, press &#8220;Alloc&#8221; button many times and yo<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3131e6da7622e8c6a750b97252e910be?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ntjameson<br \/>\njava memory out-of-memory<br \/>\nThere is insufficient memory for the Java Runtime Environment to continue. Native memory allocation (malloc) failed to allocate 180992 bytes for Chunk::new Possible reasons:The system is out of physical RAM or swap spaceIn 32 bit mode, the process size limit was hit Possible solutions:Reduce memory load on the systemIncrease physical memory or swap spaceCheck if swap backing store is fullUse 64 bit Java on a 64 bit OSDecrease Java heap size (-Xmx\/-Xms)Decrease number of Java threadsDecrease Java<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/92dfc4f2fd927479f69cf5d3b89951f0?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMattS<br \/>\njava multithreading memory threadpool genetic-algorithm<br \/>\nSo I&#8217;m working on parallelizing a genetic algorithm (coded in Java), and I&#8217;ve decided to use an Executor to manage the asynchronous execution of the fitness tests for the individuals in my population. I did this because it means I can create an executor with a fixed thread pool size and simply reuse those threads every generation as opposed to creating new threads every single generation.Now, I have a set of tests I&#8217;ve been running to monitor the performance of my GA with growing population size<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/sx94Y.jpg?s=32&amp;g=1\" \/><br \/>\nvauge<br \/>\nandroid memory bitmap heap<br \/>\nWhen I minimize my Android App for about 4 or 5 times, I always get the following error:02-01 19:24:11.980: E\/dalvikvm-heap(22362): Out of memory on a 3686416-byte allocation. 02-01 19:24:12.000: E\/dalvikvm(22362): Out of memory: Heap Size=62755KB, Allocated=55237KB, Limit=65536KB 02-01 19:24:12.000: E\/dalvikvm(22362): Extra info: Footprint=62435KB, Allowed Footprint=62755KB, Trimmed=2144KB 02-01 19:24:12.000: E\/Bitmap_JNI(22362): Create Bitmap Failed. 02-01 19:24:12.000: E\/Bitmap_JNI(22362)<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/039ed6b4c652268929eb52c37c4b4aec?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nLa bla bla<br \/>\nandroid memory device leak<br \/>\nI am monitoring GPS via Uart communication protocol onto an android based device in which I have to monitor the port every second for the time update,I got following problems after some time.01-01 12:22:52.226: E\/Surface(1254): Surface (identity=17) requestBuffer(0, 0, 0, 0, 00000033) returned a buffer with a null handle 01-01 12:22:52.226: E\/Surface(1254): getBufferLocked(0, 0, 0, 0, 00000033) failed (Out of memory) 01-01 12:22:52.226: E\/Surface(1254): dequeueBuffer failed (Out of memory) 01-01<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1ccc75f9a7048ace1defebc95ad10dbd?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\nuser3223633<br \/>\nandroid apache python-2.7 memory wsgi<br \/>\nI am writing python API with flask running on Apache2+mod_wsgi.I want us Android Tools from python by subprocess.cmd = [&#8216;\/opt\/adt\/sdk\/tools\/android&#8217;, &#8216;list&#8217;, &#8216;target&#8217;, &#8216;-c&#8217;]value = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)output, errors = value.communicate()and i get error from OpenJDK Server int variable output,SWT folder &#8216;\/opt\/adt\/sdk\/tools\/lib\/OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007fc0582f8000, 2555904,<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4eea78103ba2306f23b41fd15b46228e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nBrian Rasmussen<br \/>\nmemory lucene.net leak<br \/>\nI am using Lucene.Net-2.3.2.1 in my project. My project also supporting multithreading environment. Lucene Indexing service is working as Windows Service. Problem is when the service is running, it&#8217;s memory blockage is gradually increasing. So after some hours, it shows a memory of 150 mb in Task Manager where as it start with 13 mb.so it has a memory increasing behavior. I identified by dotTrace Profiler that in Lucene.Net there are some methods and objects that increased the memory. From Call<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/aef795eae991fa713cc72aeb2ee789a0?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nNeil Wightman<br \/>\njava xml memory ant<br \/>\nI am having trouble adding the -XX:OnOutOfMemoryError=&#8221;taskkill \/F \/PID %%p&#8221;argument to a java command in ant.When I add &lt;jvmarg value=&#8221;-XX:OnOutOfMemoryError=&#8221;taskkill \/F \/PID %%p&#8221;&#8221;\/&gt;or &lt;jvmarg value=&#8221;-XX:OnOutOfMemoryError=\\\\&#8221;taskkill \/F \/PID %%p\\\\&#8221;&#8221;\/&gt;Ant fails to parse the XML file.If I do this&lt;jvmarg value=&#8221;-XX:OnOutOfMemoryError=&amp;quot;taskkill \/F \/PID %%p&amp;quot;&#8221;\/&gt;Then i get[java] Caused by: java.lang.ClassNotFoundException: .F[java] at java.net.URLClassLoader$1<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/40ac5201d092eccee1f78e759a6f9df3?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmiha<br \/>\nandroid memory android-ndk<br \/>\nI&#8217;m using very large bitmaps and I store data in a big int[]. The images can be really large and I can&#8217;t downsample them (I&#8217;m getting the bitmaps over the wire and rendering them).The problem I&#8217;m hitting is on very large bitmaps (bitmap size = 64MB), where I try to allocate int array with size 16384000. I&#8217;m testing this on Samsung Galaxy SII, which should have enough memory to handle this, but it seems there is a &#8220;cap&#8221; on heap size. The method Runtime.getRuntime().maxMemory() returns 64MB, so t<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f9ff2b8c7e171c5ca7fc50e4bb9aa83d?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ndblanky<br \/>\nmemory cuda<br \/>\nI am having a memory allocation problem I can&#8217;t quite understand. I am trying to allocate a fairly large chunk of the GPU&#8217;s memory (I am guessing it is probably a memory fragmentation issue perhaps?)My very simplified code is:#include &lt;stdio.h&gt; #include &lt;cuda.h&gt;int main() {CUcontext ctx;CUdevice dev = 0;void *toSpace;CUdeviceptr ptr = (CUdeviceptr)NULL;int status;int size = 1280*1024*1024;status = cuInit(0);printf(&#8220;status: %i\\n&#8221;,status); status = cuCtxCreate(&amp;ctx, 0, dev);printf(<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3db724a8e76acb9224d945d49384b857?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDamon<br \/>\nwindows virtual-memory<br \/>\nThis morning I stumbled across a surprising number of page faults where I did not expect them. Yes, I probably should not worry, but it still strikes me odd, because in my understanding they should not happen. And, I&#8217;d like better if they didn&#8217;t.The application (under WinXP Pro 32bit) reserves a larger section (1GB) of address space with VirtualAlloc(MEM_RESERVE) and later allocates moderately large blocks (20-50MB) of memory with VirtualAlloc(MEM_COMMIT). This is done in a worker ahead of time,<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/12a5de18c6ec419a232a629a631c4612?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nArmen Tsirunyan<br \/>\nc++ c memory-management operating-system virtual-memory<br \/>\nMaybe a naive question, but&#8230;Confirm or deny: The existence of memory for objects\/variables of automatic and static storage duration is determined compile-time and there is absolutely zero chance that the program will fail runtime because there wasn&#8217;t enough memory for an automatic object. Naturally, when the constructor of an automatic object performs dynamic allocations and such allocation fails, we consider this to be a failure on dynamic allocation, and not automatic.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d01891f2b521660ac24839d6473d1d8f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAssaf Lavie<br \/>\nasp.net iis memory virtual-memory<br \/>\nOn my machine (XP, 64) the ASP.net worker process (w3wp.exe) always launches with 5.5GB of Virtual Memory reserved. This happens regardless of the web application it&#8217;s hosting (it can be anything, even an empty web page in aspx). This big old chunk of virtual memory is reserved at the moment the process starts, so this isn&#8217;t a gradual memory &#8220;leak&#8221; of some sort.Some snooping around with windbg shows that the memory is question is Private, Reserved and RegionUsageIsVAD, which indicates it might b<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a648ccb47bbbe9497c073315aac4d33e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJoachim Sauer<br \/>\njava linux memory virtual-memory<br \/>\nI have a problem with a Java application running under Linux.When I launch the application, using the default maximum heap size (64mb), I see using the tops application that 240 MB of virtual Memory are allocated to the application. This creates some issues with some other software on the computer, which is relatively resource-limited.The reserved virtual memory will not be used anyway, as far as I understand, because once we reach the heap limit an OutOfMemoryError is thrown. I ran the same a<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e883c562cf7a05ac7deeba7fe5236eaa?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSetzer<br \/>\nloader mmap virtual-memory sigsegv mprotect<br \/>\nI have looked at the various topics relating to this, but couldn&#8217;t find this specific issue I am having.Things I looked at: Injecting code into executable at runtime http:\/\/stackoverflow.com\/questions\/2705792\/c-sigsegv-handler-mprotect Can I write-protect every page in the address space of a Linux process? http:\/\/stackoverflow.com\/questions\/2663456\/write-a-signal-handler-to-catch-sigsegvI am able to handle SIGSEGV gracefully when the protection needs to be set to either PROT_READ or PROT_WRITE i<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a6e370f992e254ef454b8c26e2243de9?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmiaobo<br \/>\noperating-system embedded glibc virtual-memory<br \/>\nI am looking for an embedded OS that satisfies the requirements below, I did several searches on the site and web but seems hard to find anything close, so I turned it here, hope this is not a duplicate question already being asked before.I need to find an embedded OS that:have to:be Open source be able to runs on x86 support standard glibc and glibc++ runtime, and POSIX APIs have multi-threading support, including in-kernel task scheduling; and user-land pthread API support may support only sin<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/tmGC4.jpg?s=32&amp;g=1\" \/><br \/>\nDrav Sloan<br \/>\nmemory virtual-memory thread<br \/>\nI started 700+ threads from a single program And my \/proc\/[PID]\/status file shows the following output.VmPeak: 7228104 kB VmSize: 7228104 kB VmLck: 0 kB VmHWM: 3456 kB VmRSS: 3456 kB VmData: 7222340 kB VmStk: 88 kB VmExe: 4 kB VmLib: 1540 kB VmPTE: 2864 kB StaBrk: 15e84000 kB Brk: 15ec6000 kB StaStk: 7fff765095a0 kB Threads: 706But I&#8217;m having only 2gb RAM and 4gb swap space. Can somebody tell me how did the Virtual Memory get to 7gb+?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a717291747c76567bb0f086e15ae6e43?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nGilles<br \/>\nlinux process memory virtual-memory elf<br \/>\nI read somewhere that (at least since Linux v. 2.6) all user-space code is placed at load address 0x8048000 in the virtual memory address space.My own observations confirm this. I have done a cat \/proc\/&#8230;&#8230;..\/mapsfor several processes and the very first section of a process&#8217; program text always starts at &#8216;0x8048000&#8217;.Furthermore the C library startup code and all the other runtime goodies all seem to be mapped after this default value. This constitutes almost 128 M of address space, not a lot c<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/df9d2a02744f666e97375e05fdc54255?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nsawdust<br \/>\noperating-systems virtual-memory memory-management<br \/>\nI was just reading Operating System Principles by Silberschatz et al when I came across paging in memory management.I&#8217;m slightly confused about it. It states that Physical Memory(I assume it&#8217;s RAM) is divided into frames, and logical memory is divided into pages. CPU generates logical addresses containing page number and an offset. This page number is used to retrieve the frame number from a page table which gives the base address so the physical address is calculated as base+offset. My question<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/21e2208ace8e9022d8feca4e4fb3dcae?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDMA57361<br \/>\nswap virtual-memory<br \/>\nI have a program that requires a lot of memory. So much that the malloc fails as the system goes out of memory.I don&#8217;t care if the overhead for swapping pages in and out of the disk is too high &#8211; I just want the program to run. So, is it possible that by sufficiently increasing the swap partition size the out-of-memory error can be prevented by effectively making more memory is available?<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>sdaau c++ c linux bash Sorry about the title, couldn&#8217;t really think of anything else to describe the problem :)Ok, so the thing is like this: I&#8217;m trying to use a proprietary freeware application under Linux (and hence the problem; if I had the source, I could have rebuilt it). Furthermore, I&#8217;m trying to run [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5667","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5667","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5667"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5667\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}