Re: [Dev-C++] Dev-cpp-users Digest, Vol 12, Issue 11
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: MOHAMMED S. <chi...@ya...> - 2007-05-31 12:51:41
|
Hi Everyone, I need help regarding writing c++ application that either starts up when windows is started or runs at the background whiles windows runs using the Dev-C++ ide. dev...@li... wrote:Send Dev-cpp-users mailing list submissions to dev...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.ncet/lists/listinfo/dev-cpp-users or, via email, send a message with subject or body 'help' to dev...@li... You can reach the person managing the list at dev...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Dev-cpp-users digest..." Today's Topics: 1. Re: Dev-cpp-users Digest, Vol 12, Issue 9 (Luis Alfonso Giraldo) 2. Re: Dev-cpp-users Digest, Vol 12, Issue 9 (Per Westermark) 3. memory leak! (Lloyd) 4. Re: memory leak! (Jonathan Winterflood) 5. Re: memory leak! (Lloyd) 6. Re: memory leak! (Per Westermark) ---------------------------------------------------------------------- Message: 1 Date: Wed, 23 May 2007 23:21:37 -0500 From: "Luis Alfonso Giraldo" Subject: Re: [Dev-C++] Dev-cpp-users Digest, Vol 12, Issue 9 To: Message-ID: <200...@sm...> Content-Type: text/plain; charset="iso-8859-1" Hi, Please, I need code of sparse Matriz in C++: M?thods: 1. MakeDisperseMatrix(nF, nC): Matriz Dispersa vac?a 2. isEmpty(DisperseMatrix): Decide si la Matriz Dispersa est? vac?a 3. getNumberOfRows(DisperseMatrix): Indica el n?mero de filas de la Matriz Dispersa 4. getNumberOfColumns(DisperseMatrix): Indica el n?mero de columnas de la Matriz Dispersa 5. getNumberOfElements(DisperseMatrix): Indica el n?mero de elementos existentes en la Matriz Dispersa 6. printMatrix(DisperseMatrix): Imprime la matriz por filas 7. printMatrizInFile(DisperseMatrix, File): Imprime la matriz en un archivo (Guardar) 8. getRowOfInsertion(DisperseMatrix, nF, nC): Retorna una referencia a los predecesores en la fila a insertar. 9. makeNode(object, nF, nC): Crea un nodo. 10. getColumnOfInsertion(DisperseMatrix, nF, nC): Retorna una referencia a los predecesores en la columna a insertar. 11. InsertInMatriz(DisperseMatrix, nF, nC, object): Inserta "object" en la fila y columna indicada. 12. getValuePosition(DisperseMatrix, nF, nC): Retorna el valor almacenado en la fila y columna indicado. Si no existe devuelve 0. 13. getPorcentUsed(DisperseMatrix): Indica el porcentaje de elementos almacenados. 14. getMaxElements(DisperseMatrix): Indica el n?mero m?ximo de elementos que pueden ser almacenados en la matriz. 15. addDisperseMatrix(DisperseMatrix1, DisperseMatrix2): Devuelve en DisperseMatrix1 el resultado de sumar las dos matrices. 16. scaleDisperseMatrix(DisperseMatrix, valor): Retorna la matriz resultante de multiplicar cada posici?n existente por valor. 17. multDisperseMatrix (DisperseMatrix1,DisperseMatrix2, DisperseMatrix3): Retorna en DisperseMatrix3 el resultante de multiplicar las matrices DisperseMatrix1 y DisperseMatrix2(en ese orden). Thanks and excuse me :( Luis Alfonso Colombia ------------------------------ Message: 2 Date: Thu, 24 May 2007 07:34:19 +0200 (CEST) From: Per Westermark Subject: Re: [Dev-C++] Dev-cpp-users Digest, Vol 12, Issue 9 To: Luis Alfonso Giraldo Cc: dev...@li... Message-ID: Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Is this part of a school work? If your list is part of an existing library, Google should find the code. If it is part of a school assignment, you better start coding. /pwm On Wed, 23 May 2007, Luis Alfonso Giraldo wrote: > Hi, > > > Please, I need code of sparse Matriz in C++: > M?thods: > 1. MakeDisperseMatrix(nF, nC): Matriz Dispersa vac?a > 2. isEmpty(DisperseMatrix): Decide si la Matriz Dispersa est? vac?a > 3. getNumberOfRows(DisperseMatrix): Indica el n?mero de filas de la Matriz > Dispersa > 4. getNumberOfColumns(DisperseMatrix): Indica el n?mero de columnas de la > Matriz Dispersa > 5. getNumberOfElements(DisperseMatrix): Indica el n?mero de elementos > existentes en la Matriz Dispersa > 6. printMatrix(DisperseMatrix): Imprime la matriz por filas > 7. printMatrizInFile(DisperseMatrix, File): Imprime la matriz en un archivo > (Guardar) > 8. getRowOfInsertion(DisperseMatrix, nF, nC): Retorna una referencia a los > predecesores en la fila a insertar. > 9. makeNode(object, nF, nC): Crea un nodo. > 10. getColumnOfInsertion(DisperseMatrix, nF, nC): Retorna una referencia a > los predecesores en la columna a insertar. > 11. InsertInMatriz(DisperseMatrix, nF, nC, object): Inserta "object" en la > fila y columna indicada. > 12. getValuePosition(DisperseMatrix, nF, nC): Retorna el valor almacenado en > la fila y columna indicado. Si no existe devuelve 0. > 13. getPorcentUsed(DisperseMatrix): Indica el porcentaje de elementos > almacenados. > 14. getMaxElements(DisperseMatrix): Indica el n?mero m?ximo de elementos que > pueden ser almacenados en la matriz. > 15. addDisperseMatrix(DisperseMatrix1, DisperseMatrix2): Devuelve en > DisperseMatrix1 el resultado de sumar las dos matrices. > 16. scaleDisperseMatrix(DisperseMatrix, valor): Retorna la matriz resultante > de multiplicar cada posici?n existente por valor. > 17. multDisperseMatrix (DisperseMatrix1,DisperseMatrix2, DisperseMatrix3): > Retorna en DisperseMatrix3 el resultante de multiplicar las matrices > DisperseMatrix1 y DisperseMatrix2(en ese orden). > > Thanks and excuse me :( > > Luis Alfonso > Colombia > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > ------------------------------ Message: 3 Date: Thu, 24 May 2007 11:24:16 +0530 From: Lloyd Subject: [Dev-C++] memory leak! To: dev...@li... Message-ID: <1179986056.9291.6.camel@RCCF025> Content-Type: text/plain Hi, I have written a program in Linux. It opens a file and maps it to memory using mmap and unmaps and closes the file. I am using a custom written data structure as well in the program. There is no leak associated with the data structure. But some ware a big leak is present. (I dont know where) I assume it could be with mmap and munmap... Because as I open more and more files, the leak gradually increases to megabytes! but for each mam,p the munmap is called correspondingly. And the range which I give to unmap is correct. Where could be the source of problem? Even after the program exit the memory consumption remains same (not reducted to the program startup state). I see this with the aid of system monitoring tool.. please help me... Thanks and Regards, Lloyd ______________________________________ Scanned and protected by Email scanner ------------------------------ Message: 4 Date: Fri, 25 May 2007 08:28:29 +0200 From: "Jonathan Winterflood" Subject: Re: [Dev-C++] memory leak! To: ll...@cd... Cc: dev...@li... Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi, Maybe you should use valgrind to test your program for leaks (compiling with debugging symbols should help you get a digestable log) Jonathan On 5/24/07, Lloyd wrote: > > Hi, > I have written a program in Linux. > It opens a file and maps it to memory using mmap and unmaps and closes > the file. I am using a custom written data structure as well in the > program. There is no leak associated with the data structure. But some > ware a big leak is present. (I dont know where) I assume it could be > with mmap and munmap... Because as I open more and more files, the leak > gradually increases to megabytes! but for each mam,p the munmap is > called correspondingly. And the range which I give to unmap is correct. > > Where could be the source of problem? Even after the program exit the > memory consumption remains same (not reducted to the program startup > state). I see this with the aid of system monitoring tool.. > > please help me... > > Thanks and Regards, > Lloyd > > > > > ______________________________________ > Scanned and protected by Email scanner > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > -- linux, c'est une question de VI ou de MORE -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 5 Date: Fri, 25 May 2007 12:27:15 +0530 From: Lloyd Subject: Re: [Dev-C++] memory leak! To: dev...@li... Message-ID: <1180076235.12168.5.camel@RCCF025> Content-Type: text/plain Thank you Jonathan. I tried using valgrind, but my program uses wxWidgets (a GUI library). The out put of valgrind is unreadable and not understandable for me :( It shows lots of lines as output When I executed my program more and more, at the first stages (first few 100 files) of file mapping no leak is shown, but when I go further, for each 10 or 15 files 1MB to 3MB of leak is shown! I am not understanding whats happening. Is there any chance of going something in the OS? Thank you, Lloyd On Fri, 2007-05-25 at 08:28 +0200, Jonathan Winterflood wrote: > Hi, > > Maybe you should use valgrind to test your program for leaks > (compiling with debugging symbols should help you get a digestable > log) > > Jonathan > > On 5/24/07, Lloyd wrote: > Hi, > I have written a program in Linux. > It opens a file and maps it to memory using mmap and unmaps > and closes > the file. I am using a custom written data structure as well > in the > program. There is no leak associated with the data structure. > But some > ware a big leak is present. (I dont know where) I assume it > could be > with mmap and munmap... Because as I open more and more files, > the leak > gradually increases to megabytes! but for each mam,p the > munmap is > called correspondingly. And the range which I give to unmap is > correct. > > Where could be the source of problem? Even after the program > exit the > memory consumption remains same (not reducted to the program > startup > state). I see this with the aid of system monitoring tool.. > > please help me... > > Thanks and Regards, > Lloyd > > > > > ______________________________________ > Scanned and protected by Email scanner > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and > take > control of your XML. No limits. Just data. Click to get it > now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: > http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > -- > linux, c'est une question de VI ou de MORE ______________________________________ Scanned and protected by Email scanner ------------------------------ Message: 6 Date: Fri, 25 May 2007 10:51:38 +0200 (CEST) From: Per Westermark Subject: Re: [Dev-C++] memory leak! To: Lloyd Cc: dev...@li... Message-ID: Content-Type: TEXT/PLAIN; charset=US-ASCII How are you deciding that the application is leaking memory? Are you just looking at amount of free memory in Linux? Note that Linux will try to use as much of it's memory as possible for file caching, i.e. if you open and read a file and then close the application, the amount of free memory will shrink, since the OS has cached the contents of the file. The only "loss" of memory I normally have seen in Linux is when applications allocates named shared memory, and forgets to release it. The kernel will keep the shared memory blocks, allowing other applications to specify the same name to get access to the memory block. /pwm On Fri, 25 May 2007, Lloyd wrote: > Thank you Jonathan. I tried using valgrind, but my program uses > wxWidgets (a GUI library). The out put of valgrind is unreadable and not > understandable for me :( > > It shows lots of lines as output > > When I executed my program more and more, at the first stages (first few > 100 files) of file mapping no leak is shown, but when I go further, for > each 10 or 15 files 1MB to 3MB of leak is shown! I am not understanding > whats happening. Is there any chance of going something in the OS? > > Thank you, > Lloyd > > > On Fri, 2007-05-25 at 08:28 +0200, Jonathan Winterflood wrote: > > Hi, > > > > Maybe you should use valgrind to test your program for leaks > > (compiling with debugging symbols should help you get a digestable > > log) > > > > Jonathan > > > > On 5/24/07, Lloyd wrote: > > Hi, > > I have written a program in Linux. > > It opens a file and maps it to memory using mmap and unmaps > > and closes > > the file. I am using a custom written data structure as well > > in the > > program. There is no leak associated with the data structure. > > But some > > ware a big leak is present. (I dont know where) I assume it > > could be > > with mmap and munmap... Because as I open more and more files, > > the leak > > gradually increases to megabytes! but for each mam,p the > > munmap is > > called correspondingly. And the range which I give to unmap is > > correct. > > > > Where could be the source of problem? Even after the program > > exit the > > memory consumption remains same (not reducted to the program > > startup > > state). I see this with the aid of system monitoring tool.. > > > > please help me... > > > > Thanks and Regards, > > Lloyd > > > > > > > > > > ______________________________________ > > Scanned and protected by Email scanner > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and > > take > > control of your XML. No limits. Just data. Click to get it > > now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: > > http://www23.brinkster.com/noicys/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > > > -- > > linux, c'est une question de VI ou de MORE > > > ______________________________________ > Scanned and protected by Email scanner > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > ------------------------------ ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ------------------------------ _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users End of Dev-cpp-users Digest, Vol 12, Issue 11 ********************************************* --------------------------------- It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. |