Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
msize in 3.7.10
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Max Vlasov  
View profile  
 More options Jan 17 2012, 9:11 am
From: Max Vlasov <max.vla...@gmail.com>
Date: Tue, 17 Jan 2012 18:11:12 +0400
Local: Tues, Jan 17 2012 9:11 am
Subject: [sqlite] msize in 3.7.10
Hi,
I'm using static linking with Delphi and a new function required binding in
3.7.10 - msize (__msize). The problem here is that there's no official way
to query the size of a memory block in Delphi memory manager, at least I'm
not aware of one. Should I solve this anyway (for example by keeping my own
list of blocks and their sizes) or is there some other solution
(enabled/disable some define)?

Thanks,

Max
_______________________________________________
sqlite-users mailing list
sqlite-us...@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Max Vlasov  
View profile  
 More options Jan 18 2012, 6:56 am
From: Max Vlasov <max.vla...@gmail.com>
Date: Wed, 18 Jan 2012 15:56:41 +0400
Local: Wed, Jan 18 2012 6:56 am
Subject: Re: [sqlite] msize in 3.7.10

On Tue, Jan 17, 2012 at 6:11 PM, Max Vlasov <max.vla...@gmail.com> wrote:
> Hi,
> I'm using static linking with Delphi and a new function required binding
> in 3.7.10 - msize (__msize). The problem here is that there's no official
> way to query the size of a memory block in Delphi memory manager, at least
> I'm not aware of one. Should I solve this anyway (for example by keeping my
> own list of blocks and their sizes) or is there some other solution
> (enabled/disable some define)?

Quoting and answering myself )

CMIIW, but it seems that HAVE_MALLOC_USABLE_SIZE can't control anything on
Windows. As I suppose it's a new define introduced in 3.7.10

Although there are plenty of lines where #ifdef SQLITE_MALLOCSIZE assumes
there's a possibility that it either exists or not, but if I don't define
anything these lines forces HAVE_MALLOC_USABLE_SIZE to 1 on windows
// ------------------
#if !defined(    HAVE_MALLOC_USABLE_SIZE) && SQLITE_OS_WIN
# define HAVE_MALLOC_USABLE_SIZE 1
# define malloc_usable_size _msize
#endif
// ------------------

But looks like on other platforms the define is effective  ( because "....
&& SQLITE_OS_WIN" makes this forcing disabled) and the following line obeys
the setting afterwards
//---------------------
#ifdef HAVE_MALLOC_USABLE_SIZE
#include <malloc.h>
#define SQLITE_MALLOCSIZE(x) malloc_usable_size(x)
#else
#undef SQLITE_MALLOCSIZE
#endif
//-------------

Was it intentional or occasional?

Max
_______________________________________________
sqlite-users mailing list
sqlite-us...@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Hipp  
View profile  
 More options Jan 18 2012, 7:47 am
From: Richard Hipp <d...@sqlite.org>
Date: Wed, 18 Jan 2012 07:47:43 -0500
Local: Wed, Jan 18 2012 7:47 am
Subject: Re: [sqlite] msize in 3.7.10

On Tue, Jan 17, 2012 at 9:11 AM, Max Vlasov <max.vla...@gmail.com> wrote:
> Hi,
> I'm using static linking with Delphi and a new function required binding in
> 3.7.10 - msize (__msize). The problem here is that there's no official way
> to query the size of a memory block in Delphi memory manager, at least I'm
> not aware of one. Should I solve this anyway (for example by keeping my own
> list of blocks and their sizes) or is there some other solution
> (enabled/disable some define)?

Try using the trunk of the SQLite source tree with the SQLITE_WITHOUT_MSIZE
preprocessor macro.

> Thanks,

> Max
> _______________________________________________
> sqlite-users mailing list
> sqlite-us...@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

--
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-us...@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Max Vlasov  
View profile  
 More options Jan 18 2012, 7:56 am
From: Max Vlasov <max.vla...@gmail.com>
Date: Wed, 18 Jan 2012 16:56:51 +0400
Local: Wed, Jan 18 2012 7:56 am
Subject: Re: [sqlite] msize in 3.7.10

On Wed, Jan 18, 2012 at 4:47 PM, Richard Hipp <d...@sqlite.org> wrote:
> Try using the trunk of the SQLite source tree with the SQLITE_WITHOUT_MSIZE
> preprocessor macro.

Richard, thank, I will try, but I just tried to replace

#if !defined(HAVE_MALLOC_USABLE_SIZE) && SQLITE_OS_WIN
# define HAVE_MALLOC_USABLE_SIZE 1
# define malloc_usable_size _msize
#endif

.....with

#if defined(HAVE_MALLOC_USABLE_SIZE) && SQLITE_OS_WIN
# define malloc_usable_size _msize
#endif

isn't it a proper fix for HAVE_MALLOC_USABLE_SIZE to work on windows? I
compiled, it doesn't require __msize anymore and work.

Max
_______________________________________________
sqlite-users mailing list
sqlite-us...@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Max Vlasov  
View profile  
 More options Jan 18 2012, 8:18 am
From: Max Vlasov <max.vla...@gmail.com>
Date: Wed, 18 Jan 2012 17:18:40 +0400
Local: Wed, Jan 18 2012 8:18 am
Subject: Re: [sqlite] msize in 3.7.10

On Wed, Jan 18, 2012 at 4:47 PM, Richard Hipp <d...@sqlite.org> wrote:
> On Tue, Jan 17, 2012 at 9:11 AM, Max Vlasov <max.vla...@gmail.com> wrote:

> > Hi,
> > I'm using static linking with Delphi and a new function required binding
> in
> > 3.7.10 - msize (__msize).
> > ...

> Try using the trunk of the SQLite source tree with the SQLITE_WITHOUT_MSIZE
> preprocessor macro.

Richard, thanks, tried trunk, everything works, also saw the comment in the
sources about automatic usage of msize on Windows. So probably having
HAVE_MALLOC_USABLE_SIZE always defined on Windows is necessity.

Max
_______________________________________________
sqlite-users mailing list
sqlite-us...@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »