Search Results

Search found 9889 results on 396 pages for 'pointer speed'.

Page 3/396 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • why pointer to pointer is needed to allocate memory in function

    - by skydoor
    Hi I have a segmentation fault in the code below, but after I changed it to pointer to pointer, it is fine. Could anybody give me any reason? void memory(int * p, int size) { try{ p = (int *) malloc(size*sizeof(int)); } catch( exception& e) { cout<<e.what()<<endl; } } it does not work in the main function as blow int *p = 0; memory(p, 10); for(int i = 0 ; i < 10; i++) p[i] = i; however, it works like this . void memory(int ** p, int size) { `//pointer to pointer` try{ *p = (int *) malloc(size*sizeof(int)); } catch( exception& e) { cout<<e.what()<<endl; } } int main() { int *p = 0; memory(&p, 10); //get the address of the pointer for(int i = 0 ; i < 10; i++) p[i] = i; for(int i = 0 ; i < 10; i++) cout<<*(p+i)<<" "; return 0; }

    Read the article

  • Mac download speed keeps decreasing

    - by hatorade
    I have a Mac that is getting extremely low connection speed from my WiFi. The other 3 computers in this house have a fast connection. However, on this Mac, once I connect to WiFi it's fast, but as time goes on the speed decreases dramatically. I thought it was the browser or something (Safari) so I downloaded Firefox, but I have watched the download speed decrease consistently as time goes by and right now it's at 8kb/sec instead of the 60-200 range it started at. Any suggestions?

    Read the article

  • Windows Server 2008 R2 slows internet speed

    - by Tone
    I just installed Windows Server 2008 R2 as my main file server on my home network. I've noticed that often times when I start my day my internet connection speed is slow. I'll go to Speakeasy speed test and it'll be at about 25% of its normal speed. When I restart my Server 2008 machine it increases back to normal. It will stay normal until Server 2008 has been running for a while. Any ideas? Edit: I had installed Collabnet Subversion within the past week which installs/sets up some other stuff for web access, I just uninstalled it. I'll report back tomorrow if that fixed my problem.

    Read the article

  • Fedora12 Slow USB 2.0 Write Speed, ehci_hcd module is missing

    - by MA1
    I am using Fedora 12, the problem I am facing is USB 2.0 write speed. I have a dual boot system with Windows XP and Fedora 12. USB 2.0 write speed in Windows XP is much faster then what I am getting in Fedora 12. After searching Google I came to know that ehci_hcd module is missing/not present in my system. ehci_hcd module is neither loaded nor it is present in the available list of modules. Can someone guide me how to fix this issue? Does ehci_hcd have something to do with USB 2.0 write speed? Do I have to recompile the kernel and add/enable the ehci_hcd module?

    Read the article

  • how to test lan network speed with ps3

    - by Damon
    I am having a heck of a time trying to get videos streaming to my PS3. I want to know if there is some way to test the speed between my PC and ps3 to see if that is the issue. For some reason when things get really slow between the ps3 and my computer (it's a wired connection through a switch), the wireless internet on completely different computer gets slow. I don't know what's causing what, but I don't know why there should be any correlation between internet speed on a wirelessly connected laptop and the LAN speed between a wired ps3 and computer.

    Read the article

  • Web connection speed issue

    - by Iroll750
    I encounter a strange issue with my web (wireless) connection on my laptop (Ubuntu 11.10) I'm able to have 540kbps (down) on all computers in my house (including laptop at the same distance from the box) except me. When i do a speed connection test, i can have this optimal speed immediately after booting. As i surf on the net, watching videos, download things, etc... it becomes slower progressively until 100-110 kbps and the speed remain the same until i reboot. I tried to figure out if a process consume bandwith in background with nethogs but i found nothing suspicious. Any ideas ? Thanks in advance for your help !!

    Read the article

  • Test site speed

    - by Elad Lachmi
    I am test driving an Akmai CDN architecture and before committing to buy, I would like to gauge the real performance gain from the acceleration feature. What would be the best MO for doing speed tests from different locations around the world? I would like to test the page load speed and not just the server response time. I would like to test speed from as many edge locations as possible. I do not mind a paid service as well, if it is optimal. Thank you!

    Read the article

  • Does lshw list the "factory" speed of a memory module or the effective speed and how to find the former?

    - by Panayiotis Karabassis
    I hope I phrased this correctly. lshw gives: description: DIMM Synchronous 400 MHz (2.5 ns) product: M378B5773CH0-CH9 vendor: Samsung physical id: 0 slot: DIMM0 size: 2GiB width: 64 bits clock: 400MHz (2.5ns) And indeed the memory speed is set is set to 800MHz in the BIOS, which I think makes sense since it is a double rate. On the other hand, Googling strongly suggests that to this product number corresponds the PC3-10600 type, which is 1333MHz, not 800MHz. And this seems to be confirmed in the BIOS, where if I select Auto for memory bus speed, 1333MHz is selected "based on SPD settings". However in the latter case, the computer does not boot, i.e. the kernel panics, complaining that something attempted to kill the Idle process. So, I am I am beginning to suspect that I have been given defective memory, the technician that installed saw this, and lowered the bus speed. Is this a possibility?

    Read the article

  • GCC, functions, and pointer arguments, warning behaviour

    - by James Morris
    I've recently updated to a testing distribution, which is now using GCC 4.4.3. Now I've set everything up, I've returned to coding and have built my project and I get one of these horrible messages: *** glibc detected *** ./boxyseq: free(): invalid pointer: 0x0000000001d873e8 *** I absolutely know what is wrong here, but was rather confused as to when I saw my C code where I call a function which frees a dynamically allocated data structure - I had passed it an incompatible pointer type - a pointer to a completely different data structure. warning: passing argument 1 of 'data_A_free' from incompatible pointer type note: expected 'struct data_A *' but argument is of type 'struct data_B *' I'm confused because I'm sure this would have been an error before and compilation would never have completed. Is this not just going to make life more difficult for C programmers? Can I change it back to an error without making a whole bunch of other warnings errors too? Or am I loosing the plot and it's always been a warning?

    Read the article

  • How many instructions to access pointer in C?

    - by Derek
    Hi All, I am trying to figure out how many clock cycles or total instructions it takes to access a pointer in C. I dont think I know how to figure out for example, p-x = d-a + f-b i would assume two loads per pointer, just guessing that there would be a load for the pointer, and a load for the value. So in this operations, the pointer resolution would be a much larger factor than the actual addition, as far as trying to speed this code up, right? This may depend on the compiler and architecture implemented, but am I on the right track? I have seen some code where each value used in say, 3 additions, came from a f2->sum = p1->p2->p3->x + p1->p2->p3->a + p1->p2->p3->m type of structure, and I am trying to define how bad this is

    Read the article

  • C Pointer Question: &(*struct->struct)

    - by NTek
    I have a struct defined with the structure as follows (names are different) struct str1 { int field1; struct str2; } And I have a *str1 in a function. I'd like to get a pointer to str2. So I tried &(str1->str2) and was hoping this would return a pointer to str2. Is this incorrect? It doesn't seem to be working. How would I get a pointer to str2 if given a pointer to str1?

    Read the article

  • What is "null pointer assignment error"?

    - by sharptooth
    One of job interview questions on C pointer here is the following: what is null pointer assignment error? I've googled for a while and don't see any reasonable explanation. What is that? Trying to write through a null pointer? Something architecture- or environment-specific? What exactly is that error?

    Read the article

  • How to const declare the this pointer sent as parameter

    - by Tomas
    Hi, I want to const declare the this pointer received as an argument. static void Class::func(const OtherClass *otherClass) { // use otherClass pointer to read, but not write to it. } It is being called like this: void OtherClass::func() { Class::func(this); } This does not compile nad if i dont const declare the OtherClass pointer, I can change it. Thanks.

    Read the article

  • Relationship between RAM & processor speed

    - by deostroll
    RAM is just used for temporary storage. But since this storage is in the cpu memory (RAM) it is fast. Programs can easily read/write values into it. I've noticed more the RAM less time it takes for the application to load/execute. But doesn't this actually depend of the processor speed (MHz or GHz values). I am wondering what is the science/relationship between processor speed and RAM.

    Read the article

  • Low USB transfer speed

    - by dhasu
    Hello, I am using Windows Vista, my Motherboard is Intel D102GGC2 The transfer speed through USB is very slow on my PC, just 2-3 MBps... I also use Ubuntu 9.10, and surprisingly the USB transfer speed is as expected, ie 16-17 MBps. So everytime i have to transfer Huge files i have to reboot into Ubuntu. What might be the Problem ??? I checked the Intel website for the ubdated drivers for my mobo, but they dont support my mobo now. Thanks

    Read the article

  • VPS Hosting Transfer Speed Question

    - by user31983
    Hi. I bought a VPS hosting(Bandwidth 500G) at US, and i connect it from China. How to improve the transfer speed when I connected my VPS hosting using WinSCP tool. I found the speed is very slow, just several huandard B/s some time. What's the meaning of Bandwidth 500G? It means the traffict limited? thank you.

    Read the article

  • How to throttle bandwidth speed from VPS

    - by Burning the Codeigniter
    I was wondering if you can throttle/boost the download speed from my VPS to me, because now and often I download a database which is quite big, typically 5-7GB. My side is quite slow (typically I have max speeds of 100Kb/s) so I was wondering if it's possible to throttle the bandwidth speed from my server to me that it could make the download much faster. If this is possible, how can I do this? My server is running Ubuntu 11.04 with a 100Mbps line.

    Read the article

  • pointer as second argument instead of returning pointer?

    - by Tyler
    I noticed that it is a common idiom in C to accept an un-malloced pointer as a second argument instead of returning a pointer. Example: /*function prototype*/ void create_node(node_t* new_node, void* _val, int _type); /* implementation */ node_t* n; create_node(n, &someint, INT) Instead of /* function prototype */ node_t* create_node(void* _val, int _type) /* implementation */ node_t* n = create_node(&someint, INT) What are the advantages and/or disadvantages of both approaches? Thanks!

    Read the article

  • Base class pointer vs inherited class pointer?

    - by Goose Bumper
    Suppose I have a class Dog that inherits from a class Animal. What is the difference between these two lines of code? Animal *a = new Dog(); Dog *d = new Dog(); In one, the pointer is for the base class, and in the other, the pointer is for the derived class. But when would this distinction become important? For polymorphism, either one would work exactly the same, right?

    Read the article

  • File download speed issue over a dedicated fibre link

    - by nixnotwin
    My ISP has installed a fibre based dedicated internet connection at the place where I work. In the beginning the connection terminated at one of the ISP's core routers. It resulted in a strange issue. Eventhough the assigned speed was 5mbps, when tests were done by downloading large files over http and ftp from multiple locations, the speed never went above 2mbps. But bittorrent downloads reached 5mbps. Even file download from the ISP servers were fine. So, at the ISP our link was attached directly to their edge router. After this file downloads from high bandwidth servers, like Google and MS, reached the 5 mbps limit. Sometimes the speed would fall down below 2 mbps and suddenly it will go up to the 5 mbps limit ( it keeps on happening during any single file download). But other downloads like ubuntu apt repositories still struggle to go above 2 mbps. The engineers at the ISP have not been able to sort out the issue. After they moved us to their edge router instead of giving us 8 public ip's, they just gave 4 ip's. When we enquired about it, they told us that giving more ip's would result in arp overload at their edge router. But somehow I was able to convince them to give us the 8 ip's which we wanted. But the file download issue has remained. What might be the reason for files from different location getting downloaded with different speeds, that too with heavy fluctuation in speeds? I have downloaded files from same url's from a connection belonging to another smaller ISP, and the speeds were fine and reached full 5 mbps limit.

    Read the article

  • pointer-to-pointer of derived class in multiple inheritance

    - by Abdul jalil
    i have 3 classes A,B and C. C is derived from A and B. i get pointer to pointer of class C and cast to A** , and B ** , the variable that hold the the B** has the address of A** in my example B ** BdoublePtr hold the address of A** .i am using the following code #include "conio.h" #include "stdio.h" #include "string.h" class A{ public: A() { strA=new char[30]; strcpy(strA,"class A"); } char *strA; }; class B { public: B() { strB=new char[30]; strcpy(strB,"class B"); } char *strB; }; class C :public A, public B { public: C() { strC=new char[30]; strcpy(strC,"class C"); } char *strC; }; int main(void) { C* ptrC=new C(); A * Aptr=(A*)ptrC; printf("\n class A value : %s",Aptr-strA); B * Bptr=(B*)ptrC; printf("\n class B value :%s",Bptr-strB); printf("\n\nnow with double pointer "); A ** AdoublePtr=(A **)&ptrC; Aptr=AdoublePtr; printf("\n class A value : %s",Aptr-strA); B * BdoublePtr=(B **)&ptrC; Bptr=*BdoublePtr; printf("\n class B value : %s",Bptr-strB); getch(); return 0; }

    Read the article

  • C++, function pointer to the template function pointer

    - by Ian
    I am having a pointer to the common static method class MyClass { private: static double ( *pfunction ) ( const Object *, const Object *); ... }; pointing to the static method class SomeClass { public: static double getA ( const Object *o1, const Object *o2); ... }; Initialization: double ( *MyClass::pfunction ) ( const Object *o1, const Object *o2 ) = &SomeClass::getA; I would like to convert this pointer to the static template function pointer: template <class T> static T ( *pfunction ) ( const Object <T> *, const Object <T> *); //Compile error where: class SomeClass { public: template <class T> static double getA ( const Object <T> *o1, const Object <T> *o2); ... }; But there is some error... Thanks for your help...

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >