🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8039

memory leak using ReadFile()

#8039
From: Ray
Date: Wed, 24 Nov 2004 18:53
18 lines
1404 bytes
Hi
Can anyone solve this perplexing problem. I am reading from a serial port 
using

ReadFile(hCom,SerInBuff,298,&dwReadSer,&OverlappedSer);

hCom is created with

 hCom= CreateFile("com1",GENERIC_READ ,0,NULL,
                         OPEN_EXISTING,FILE_FLAG_OVERLAPPED,NULL);

All works fine except that my non paged pool memory increases without limit, 
until eventually the machine runs out of resources and hangs.

Do I have to reset a pointer in some way? SerInBuff is emptied before 
reading afresh

Ray 
Technical Details
Message-ID: <41a4d8aa@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!easynet-monga!easynet.net!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,10725904fa2f4453,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Ray" <noreply@daemon.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: memory leak using ReadFile()
Date: Wed, 24 Nov 2004 18:53:29 -0000
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 81.78.10.210
Message-ID: <41a4d8aa@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1101322410 81.78.10.210 (24 Nov 2004 10:53:30 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!easynet-monga!easynet.net!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail