In a system implementing paged segmentation, the size of logical address is 42-bit where aprocess can have maximum 128 segments and the page size is 512-bytes. Page table entry size is 4-Byte. Physical address space of the system is 128KB. Compute : i.Maximum number of pages per process ii.Size of page table per segment iii.How many levels of paging will be implemented in this system? iv.What would be format of logical address? v.What would be format of physical address?

Member Avatar
Member Avatar
+0 forum 1

Hi Guys I ran into a bit of a problem with some code I am writing. I am trying to store all possible combinations of a set of numbers which are current being stored in List. Problem is my code run into an out of memory exception, heres my code: public void GetAllPossibleCombos(Dictionary<int, decimal> numbers) { var allNumbers = numbers.Keys.ToArray(); var possibleLines = new List<Line>(); Combinations<int> normalCombo = new Combinations<int>(allNumbers, 5); foreach(IList<int> n in normalCombo) { var line = new Line(); line.Number1 = n[0]; line.Number2 = n[1]; line.Number3 = n[2]; line.Number4 = n[3]; line.Number5 = n[4]; possibleLines.Add(line); } } } …

Member Avatar
Member Avatar
+0 forum 6

How to find out the MHz on RAM just by looking at it? If it doesn't show it isn't there a mathematical way to fined it?

Member Avatar
Member Avatar
+0 forum 8

I am running a unmanaged VPS - CentOS 6, 1gig of ram, 60gig storage, 256mb Vswap my.conf file: [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql symbolic-links=0 max_connections=100 max_user_connections=30 max_allowed_packet=64M wait_timeout=30 interactive_timeout=50 query_cache_type=1 query_cache_size=4M query_cache_limit=1M long_query_time=5 thread_cache_size=4 key_buffer_size=16M table_open_cache=80 log-queries-not-using-indexes log-slow-queries=/var/log/mysql/log-slow-queries.log #innodb_use_native_aio = 0 innodb_file_per_table [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid MySql tuning logs: ![myturner.png](/attachments/large/4/1956cd6cace6d0b9912f6a38d4d3f912.png "align-center") ![myturnprimer.png](/attachments/large/4/5860e0cc711113ecbe783cad32fdaa7b.png "align-center") ![myturnprimer1.png](/attachments/large/4/193124a58c01a4e6baefd7d65011ffbe.png "align-center") I installed wordpress(Deleted now) - my Vswap and SHOT up like crazy. I was probally the plugins but when i had shared i had a faster page loading time. I deleted WP, did a test and used a sample my.conf for 1gig of Ram i came across. …

Member Avatar
Member Avatar
+0 forum 4

I have a motherboard that supports dual channel DDR2 667Mhz slots with support for up to 4GB. Will I have to put in 2 sticks with each running at about 667Mhz or will I have to have 2 sticks with each running at about 333Mhz to add up to that 667Mhz?

Member Avatar
Member Avatar
+0 forum 2

Hi all, I just noticed a signficant slow-down with Daniweb, not with the server, but with the site (javascript?), in particular, with the editor that jams every few seconds. So, I checked by task manager and found that one Chrome tab was taking quite a bit of resources (memory + CPU), and lo and behold, it's the Daniweb tab. Here is what I get from "chrome://memory-redirect": PID Name Memory Private Proportional 3906 Tab 2,042,964k 34,376k DaniWeb Community Feedback | DaniWeb In other words, the Daniweb tab was taking up 2Gb of RAM. And whenever I browse around a bit, the …

Member Avatar
Member Avatar
+0 forum 24

hi all i've been strugling with this error. could someone help me. below is the code stremail = "some@email" For Each store In outlookapp.Session.Stores strchecking = store.DisplayName outlookfolder = store.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox) For Each objfolder In outlookfolder.Folders For Each obj As Object In objfolder If TypeOf (obj) Is Outlook.MailItem Then MsgBox(obj.Subject) End If Next Next Next the error says : "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." and it appears in this line `outlookfolder = store.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)`

Member Avatar
Member Avatar
+0 forum 10

IplImage *in; CvMemStorage *storage = cvCreateMemStorage (20506); CvSeq *contours=NULL; CvPoint *PointArray=NULL; for() { //image processing and feature extraction code here cvClearMemStorage (storage); //clear memory area free (PointArray); cvReleaseImage (&in); } At the end of each iteration i ma releasing memory but still i get memory shortage error after # processing 2200 images in a loop #

Member Avatar
Member Avatar
+0 forum 2

what is difference between heep and stack memory give simple consept.

Member Avatar
Member Avatar
-1 forum 5

Hello, I was recently looking through some of my code and found what I believe to be a memory leak. It is in a function that appends two strings and I am not sure how to resolve it. Here is the function: const char *strapp(const char *str,const char *s) { int size,strSize,sSize; for (strSize=0;str[strSize];++strSize); for (sSize=0;s[sSize];++sSize); size=strSize+sSize; char *ret=new char[size+1]; for (size_t i=0; i<strSize; ++i) ret[i]=str[i]; for (size_t i=0; i<sSize; ++i) ret[strSize+i]=s[i]; ret[size]=0; return ret; } Note that this includes a `new` operator but would leave it up to the untrustworthy user of the function to `delete` the resulting pointer …

Member Avatar
Member Avatar
+0 forum 7

how to reduce memory usage of java application...it takes 18 mb memory when started,when i starts new thread it takes 47 mb of memory .After i closed the started thread ,the memory is not reduced to 18 mb. It still stays at 47mb of memory usage.

Member Avatar
Member Avatar
+0 forum 1

I'm trying to pull the total physical memory on a machine and have it show just like it would inside My Computer Properties. I know I can use My.Computer.Info.TotalPhysicalMemory which will return it in bytes. This is where I'm getting stuck. I want to be able to divide it and then truncate it to where it would show like My Computer Properties would report it. Any suggestions?

Member Avatar
Member Avatar
+0 forum 7

#include<iostream> using namespace std; int main(){ int fish =6; int * fishp = &fish; cout<<fishp<<endl; return 0;} this runs ok, but i get the same memory address when i cout either fishp or &fishp. how is it possible for a pointer to have the same address as the address it's pointing to?

Member Avatar
Member Avatar
+0 forum 6

Need Help: Why Dynamic memory allocation by using pointers provides an efficient way of utilizing computer memory but such memory allocation may be problematic if not handled properly in program.

Member Avatar
Member Avatar
+0 forum 2

Shows you how to get a Python object's memory size. Notice that there can be a difference between Python versions.

Member Avatar
Member Avatar
+3 forum 3

Testing the following code from a book public class RunTime { public static void main(String[] args) { Runtime r = Runtime.getRuntime(); //MEMORY MANAGEMENT long mem1, mem2; Integer intmatrix[] = new Integer[1000]; System.out.println("Total memory is :" + r.totalMemory()); mem1 = r.freeMemory(); System.out.println("Initial free memory is :" + mem1); r.gc(); mem1 = r.freeMemory(); System.out.println("free memory after garbage collection :" + mem1); for (int i = 0; i < 1000; i++) { intmatrix[i] = new Integer(i); } mem2 = r.freeMemory(); System.out.println("free memory after integer allocation :" + mem2); System.out.println("memory used by allocation :" + (mem1 - mem2)); for (int i = 0; i …

Member Avatar
Member Avatar
+0 forum 8

Kryten is a Series 4000 mechanoid, the neurotic robotic servant appearing in cult British sitcom Red Dwarf. So what's he got to do with your computer, apart from the somewhat stereotypical link between geeks and science fiction? Well, the Kryten character was played (in all but the first appearance) by the actor Robert Llewellyn. An actor who has been hired by computer upgrade outfit Crucial.com to present an information video encouraging people, surprise surprise, to upgrade their laptop memory rather than throw it away just because it's running slowly or freezing regularly. ![ce91a16f66af05daf4f939c7df75db0c](/attachments/small/0/ce91a16f66af05daf4f939c7df75db0c.jpg "align-right") Crucial has undertaken research recently which …

Member Avatar
Member Avatar
+3 forum 11

Hello, I suspect that this is an elementary question but maybe I don’t understand how to search for it. I am a programmer, but having a small company and we can’t afford yet a system administrator, so I play this role as well with my limited practice on it. Currently we use CentOS 5.10 but I suspect the answer should also apply in other versions or distributions. We use a really small PHP core framework , less than 100kb , and we run many applications and sites using that and few of them with really heavy traffic. The question is …

Member Avatar
Member Avatar
+0 forum 6

Hi, I am planning to build a budget gaming PC with the price limit of roughly £400. I have found a group of components that add up to make roughly £350 and I was wondering whether these components are worth there money, if it will be good enough to play games well on medium graphic settings and what needs upgrading for future proofing. The aim is to build a cheap PC and as o gain more money I can buy better components as the next gen comes out. Here are the components minus the PSU: http://uk.pcpartpicker.com/part/western-digital-internal-hard-drive-wd10ezrx http://uk.pcpartpicker.com/part/patriot-memory-psd34g13332s http://uk.pcpartpicker.com/part/asus-motherboard-f2a85vpro http://uk.pcpartpicker.com/part/amd-cpu-ad641xwngxbox http://uk.pcpartpicker.com/part/asus-video-card-gtx650e2gd5

Member Avatar
Member Avatar
+0 forum 1

I've been working on a small API/Library and I realized that I was returning memory that wasn't going to be consistently put on the heap or stack. So my question is this: when I return an object from a function in a Library, should that object be on the heap? If not, where? Smart Pointers?

Member Avatar
Member Avatar
+0 forum 6

Hi, I've already posted a thread about this on stackoverflow, but nobody has said anything useful, and it's been a day since it has been posted. I'm trying to scan for a memory address in a targeted process, but it goes really really slow. Either that, or there's something wrong with my function, because it has never returned. This is my memory editing class, using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Runtime.InteropServices; using System.Diagnostics; using System.Runtime.Serialization.Formatters.Binary; using System.IO; namespace Black_Downloader { class MemoryEditor { public const uint DELETE = 0x00010000; public const uint READ_CONTROL = 0x00020000; …

Member Avatar
Member Avatar
+0 forum 2

These are two simple programs. In first program, i used static array, while in second program i used dynamic array. Both programs do the same job i.e. initiaze the array by asking the user to enter the their test scores. The problem is: 1)i have read in many books that we can't use static array if we do not know the exact size of the array. instead of this we just use dynamic array. but in both these programs we do not know the size of the array. ** according to above statement my first program should not run but …

Member Avatar
Member Avatar
+0 forum 9

Hello, I made an arbitrary precision integer library a few weeks ago. It works well, but is bounded by `256^(8*sizeof(size_t))` because it uses a simple dynamically allocated array to do its work. I want some way to have theoretically unbounded storage. I think that file io is probably best, but then I realized that stdio functions (and thus their fstream counterparts) use size_t to indicate the position in a file, so at best I will merely double the number of bits I can store. As such I thought of a format that would in a way 'cascade' files in the …

Member Avatar
Member Avatar
+0 forum 3

Hey guys i really want to start playing wow and we are getting internet again soon. I already bought the game and expansions but my computer doesn't have enoughspace so im going to download the game on a usb or external hard drive and idk what to get...does anyone know what i should do? Also i think my computer can run the game but i would rather know for sure, i have an all in one msi wind touch pc.if anyone can help please reply or txt me at (850)376-9844. Thank you

Member Avatar
Member Avatar
+0 forum 1

# This is an advanced guess the number game. import random # The very basis of this game. import math # Used for math.ceil import time # Used to split up long portions of text. def errorDisplay(errorCode): if errorCode == '1': print('\n\n\nError ' + errorCode + ': unlockedGameModes outside of expected scope on line 36.') def introDisplay(): # Displays the intro and defines the playerName Var. at the local scope, then returns it to the global scope. print('The Guessing Game! Now with more frustration!') playerName = input('\nHello, what is your name? ') print('\nWelcome ' + playerName + '.') print('\nThis is …

Member Avatar
Member Avatar
+0 forum 4

Hi all! I'm trying to create a program that produces a memory leak. I have a program that looks like it works, but I was wanting to verify whether it actually is causing a memory leak, and that it's not just some other type of issue. It's in C++, which is a language I have very little experience in. I've mostly used C#, but as it is garbage collected I thought that it may be easier to use a different language. My code is as follows: void memLeak() { int *data = new int; *data = 15; int *data1 = …

Member Avatar
Member Avatar
+0 forum 4

why I am trying to dynamically allocate memory for this pointer to array of structure I have STUDENT *studArr[] where STUDENT is the name of the structure I tried to allocate like this #include <stdio.h> #include <stdlib.h> #include <string.h> #include "queue.h" #include "stack.h" #define NAME_SIZE 20 #define RECORDS_SIZE 100 typedef struct STUDENT { char studName[20]; int timeEnter; int timeUpdate; }STUDENT; typedef struct TUTOR { char tutorName[NAME_SIZE]; int tutorTime; STUDENT *ptr; }TUTOR; QUEUE *queue1; STACK *stack1; void getData(STUDENT *studArr[]); int main(void) { STUDENT *studArr[100]; getData(studArr); return 0; } void getData(STUDENT *studArr[]) { FILE *fp; char fileName[NAME_SIZE]; int first; int i; printf("Enter …

Member Avatar
Member Avatar
+0 forum 4

Hello everyone! I hope that someone could help with my C assignment. The main task is to demonstrate forking, piping, message queues, signals, and shared memory with an example that a rabbit female is waiting for a rabbit boy to tell her a poem, she gives a gift in return (plus other things that doesn't matter now). I started programming in C two months ago, and since it's different than C++ and Java it's giving me a lot of trouble, even to manage a string (yeah, char array). Since I don't really know how to wait for each other to …

Member Avatar
Member Avatar
+0 forum 1

I'm not sure if I'm freeing the memory correctly. I have the following struct and I'm trying to free the pointer in it. typedef struct RECORD { char* name; int score; }RECORD; In my main function I have an array of this struct, therefore I'm using a loop to free it. for(index=0;index<50;index++) { free(report[index].name); report[index].score=NULL; } But then, to test if it worked I print the whole array and I get the following, ╪K3 0 Donald Knuth 0 0 Adele Goldberg 0 0 Brian Kernighan 0 Linus Torvalds 0 ╪K3 0 Grace Hopper 0 ╪K3 0 Peter Norton 0 Bill …

Member Avatar
Member Avatar
+0 forum 2

Hi, I have to open and read multiple files which are in same folders. I can search and collect the whole size of those files. But the problem is with when I'm copying the files to a buffer. How can I read the multiple files? I'm using this example for checking the multiple files. I can get the size but can't seem to open and read. Any ideas? I'm using this example for searching the files: http://msdn.microsoft.com/en-us/library/aa365200%28v=vs.85%29.aspx

Member Avatar
Member Avatar
+0 forum 3

The End.